[英]Cannot find Tools.jar
I am trying to build a copy of JOGL 我正在尝试构建JOGL的副本
but ant keeps giving me the error cannot find tools.jar. 但是蚂蚁一直给我错误找不到tools.jar。
so i searched within my JDK dir and i also cannot find it. 所以我在我的JDK目录中搜索,我也找不到它。 can someone help me with locating tools.jar
有人可以帮我找到tools.jar
Are you sure you're searching your JDK directory instead of the JRE directory? 您确定要搜索JDK目录而不是JRE目录吗? I'd expect it to be in the JDK
lib
directory. 我希望它在JDK
lib
目录中。 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. 如果Ant找不到它,请确保在JDK目录中运行Java版本而不是JRE目录中的Java版本。
I think your JAVA_HOME points to the JRE and not to the JDK. 我认为你的JAVA_HOME指向JRE而不指向JDK。
tools.jar is present in the lib folder - http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/jdkfiles.html tools.jar存在于lib文件夹中 - http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/jdkfiles.html
Please check your Environment variables: JAVA_HOME and CLASSPATH should points to JDK not JRE 请检查您的环境变量:JAVA_HOME和CLASSPATH应指向JDK而不是JRE
eg. 例如。
JAVA_HOME: C:\\Program Files\\Java\\jdk1.6.0_25; JAVA_HOME:C:\\ Program Files \\ Java \\ jdk1.6.0_25;
CLASSPATH: C:\\Program Files\\Java\\jdk1.6.0_25\\lib; CLASSPATH:C:\\ Program Files \\ Java \\ jdk1.6.0_25 \\ lib;
and path should points to JDK bin 和路径应该指向JDK bin
C:\\Program Files\\Java\\jdk1.6.0_25\\bin; C:\\ Program Files \\ Java \\ jdk1.6.0_25 \\ bin;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.