Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to locate tools.jar

I am building a project in Java.

I have this error:

Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar 

I have installed a JDK and the folder: C:\Program Files\Java\jre6\lib is in my system but the file tools.jar is not there.

like image 503
olidev Avatar asked Apr 20 '11 13:04

olidev


People also ask

Where is tools jar in Java?

jar file to be in the %JAVA_HOME%/lib but tools. jar is distributed with the JDK. Maximo includes the Java Runtime Engine (JRE), which does not contain tools.

Could not find tools jar in JDK?

You need to find where the JDK is, in my case: D:\Program Files\Java\jdk1. 8.0_11 , and if you look in the lib directory, you will see Tools. jar . Re-open command prompt and should run.

Is tools jar available in JDK 11?

I realised no tools. jar exists in the Windows build of OpenJDK 11.


1 Answers

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.

like image 148
duffymo Avatar answered Oct 04 '22 16:10

duffymo