Unable to locate tools.jar
Yes, you've downloaded and installed the Java Runtime Environment (JRE) instead of the Java Development Kit (JDK). The latter has the tools.jar, java.exe, javac.exe, etc.
Unable to locate tools.jar
A JRE doesn't have a tools.jar, you need a JDK. Set your JAVA_HOME and PATH variables so that they point to a JDK, not a JRE.
Where is tools.jar located?
On windows, I could find it at \jdk1.7.0\lib
. You can find java directory structure here
File location of tools.jar?
So here's the deal, I'm an idiot. Through my freaking out (I'm stressed because I'm on a pretty tight deadline), I had over looked some pretty fundamental information. One was the JAVA_HOME environment variable. For me, this was /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
, which I added to my .bash_profile. While I had this set correctly before I wrote this question, I hadn't made the connection when looking over this question. Artur clearly states that tools.jar is in your JAVA_HOME/lib directory. After reading this forum, which explicitly states that tools.jar was at the path below.
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/
Or if you're looking for tools.jar for Java 8, then it will be in...
/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/lib/
Ok, so I've found tools.jar, but now I need to know where to put because Java isn't seeing it. This question also explicitly states that tools.jar needs to be in ~/Library/Java/Extensions. What do you know, I copy it over, Bob's your uncle, and everything works as it should. Only wish I had a post like this to guide me at noon today instead 9:45pm.
Hopefully this saves someone else in the future!
ant build : unable to locate tools.jar. Expected find it in C:\Program Files\Java\jre7\lib\tools.jar
I solved issue with setting %JAVA_HOME% to start of the PATH. It worked for me when I set it exactly to the start.
Installing ANT - unable to locate tools.jar
I was also facing same issue but after research of an 1 hour I got a solution.
- In system variable set your jdk path in starting.
- Variable name: Path
Variable value: C:\ProgramFiles\Java\jdk1.8.0_45\bin;C:\Users\SESA401780\AppData\Local\Android\sdk\build-tools;C:\Users\SESA401780\AppData\Local\Android\sdk\tools;...
Enter Ok Ok ... and
- Open new cmd
Related Topics
Findviewbyid Returns Null in a Dialog
How to Write Ndef Records to Nfc Tag
Failed to Run Sdkmanager --List with Java 9
Android "Gps Requires Access_Fine_Location" Error, Even Though My Manifest File Contains This
Variable Is Accessed Within Inner Class. Needs to Be Declared Final
How to Change a Textview's Style at Runtime
Retrofit Expected Begin_Object But Was Begin_Array
Delete Data from Arraylist with a For-Loop
Change Background Color of Single Specific Menu Items of Navigationview
Listview Is Blank While Using Getfilter Function
How to Generate Random Number in Specific Range in Android
Comparing Two Integer Arrays in Java
How to Store More Than One String in a Map
Creating a Variable Name Using a String Value
How to Parse Output of New Date().Tostring()
Java Datetimeformatterbuilder Fails on Testtime