简体   繁体   English

ANT安装对于Windows7 64位不成功

[英]ANT installation unsuccessful for Windows7 64 bit

I have problem setting up %PATH% for ant. 我在为蚂蚁设置%PATH%时遇到问题。 I think I have done it correctly, still it doesn't work from cmd.exe 我认为我已正确完成操作,但从cmd.exe仍然无法正常工作

Here is what echo %ANT_HOME% shows 这是echo %ANT_HOME%显示的内容

C:\Users\Fero>echo %ANT_HOME%
c:\ant

and echo %PATH% echo %PATH%

C:\Users\Fero>echo %PATH%
.
.
LLIB\SAMPLES\REPL;C:\Program Files (x86)\Nmap;"C:\Users\Fero\AppData\Local\Andro
id\android-sdk\platform-tools;C:\Development\android-sdk-windows\tools;%JAVA_HOM
E%\bin;c:\ant\bin;C:\Ruby193\bin;

and this is actual call for ant 这是对ant实际要求

C:\Users\Fero>ant
'ant' is not recognized as an internal or external command,
operable program or batch file.

However if I do it manually: 但是,如果我手动执行此操作:

C:\Users\Fero>c:\ant\bin\ant -version
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\li
b\tools.jar
Apache Ant(TM) version 1.8.4 compiled on May 22 2012

There also seems to be additional problem, my jre directory has all sorts of .jar files but none called tools.jar 似乎还有其他问题,我的jre目录包含各种各样的.jar文件,但没有一个叫做tools.jar

Tools.jar : it's inside JDK , not JRE . Tools.jar :它在JDK ,而不在JRE Please, install jdk and set JAVA_HOME to the installation directory. 请安装jdk并将JAVA_HOME到安装目录。

Also, check you PATH environment variable. 另外,检查您的PATH环境变量。 Two lines with dots look very strange. 两条带点的线看起来很奇怪。 And there is non-matching quote in path. 并且路径中有不匹配的报价。

And output of dir %ANT_HOME% can solve many problems. dir %ANT_HOME%输出可以解决许多问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM