Cannot find Tools.jar

不问归期 提交于 2019-12-21 19:53:47

问题


I am trying to build a copy of JOGL

but ant keeps giving me the error cannot find tools.jar.

so i searched within my JDK dir and i also cannot find it. can someone help me with locating tools.jar


回答1:


Are you sure you're searching your JDK directory instead of the JRE directory? I'd expect it to be in the JDK lib directory. For example, on my machine I have:

c:\Program Files\Java\jdk1.6.0_26\lib\tools.jar

If Ant can't find it, make sure you're running the version of Java in the JDK directory rather than the one in the JRE directory.




回答2:


I think your JAVA_HOME points to the JRE and not to the JDK.

tools.jar is present in the lib folder - http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/jdkfiles.html




回答3:


Please check your Environment variables: JAVA_HOME and CLASSPATH should points to JDK not JRE

eg.

JAVA_HOME: C:\Program Files\Java\jdk1.6.0_25;

CLASSPATH: C:\Program Files\Java\jdk1.6.0_25\lib;

and path should points to JDK bin

C:\Program Files\Java\jdk1.6.0_25\bin;



来源:https://stackoverflow.com/questions/11265647/cannot-find-tools-jar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!