How to Locate Tools.Jar

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.

  1. In system variable set your jdk path in starting.
  2. Variable name: Path
  3. 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;...

  4. Enter Ok Ok ... and

  5. Open new cmd


Related Topics



Leave a reply



Submit