无法找到 tools.jar [英] Unable to locate tools.jar

查看:46
本文介绍了无法找到 tools.jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
无法定位 tools.jar

我正在尝试使用 ant 使用此命令进行编译:

I'm trying to use ant to compile using this command :

 ant compile

我不知道问题是来自我的 64 位 Windows 还是其他原因.因为我在64&安装了java32 个程序文件.

I don't know if the problem comes from my windows 64bit, or by something else. Because I have java Installed in the 64 & 32 prog files.

我下载了 apache-ant-1.8.2-bin 并将其放在 C:\Program Files\apache-ant-1.8.2

I downloaded apache-ant-1.8.2-bin and putted it in C:\Program Files\apache-ant-1.8.2

我试图把 ant 放在任何地方,我也在 java 64 和 32 之间切换了 ENV PATH 但每次我收到这个错误消息:

I tried to put ant everywhere, I switched also the ENV PATH between java 64 and 32 but everytime I get this error message :

无法找到 tools.jar.预计在 C:\Program 中找到它Files\Java\jre6\lib\tools.jar

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

我在 ant lib 文件夹中搜索了 tools.jar,在 java 64 和 32 中,但在系统中没有任何踪迹.

I searched for tools.jar in the ant lib folder, in the java 64 and 32, but no trace of it in the system.

你怎么看?

推荐答案

JRE 没有 tools.jar,你需要一个 JDK.设置 JAVA_HOME 和 PATH 变量,使它们指向 JDK,而不是 JRE.

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.

这篇关于无法找到 tools.jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆