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.
go to your jdk path where you installed your java
For e.g In my PC JDK installed in the following path
"C:\Program Files\Java\jdk1.7.0_17\";
After go to the lib folder e.g "C:\Program Files\Java\jdk1.7.0_17\lib"
in the lib directory there is tool.jar file
Copy this file and past it in the lib forlder of jre7 directory for e.g
"C:\Program Files\Java\jre7\lib"
No, according to your directory structure, you have installed a JRE, not a JDK. There's a difference.
It should be something like:
This is the solution for Windows: in Computer > Advanced system settings > Advanced > Environment variables..., add this in System variables:
In eclipse window> preferences>Java> Installed JRE, I pointed the directory to the jre directory in the jdk 1.7 and i worked file for me e.g C:\Program Files\Java\jdk1.7.0_71\jre
if you have installed jdk then
..Java/jdkx.x.x
folder must exist there so in stall it and give full path like
Set your
JAVA_HOME
environmental variable to point toC:\Program Files\Java\jdk1.7.0_02
.