即使正确设置了ANT_HOME,JAVA_HOME和PATH变量,我也无法运行ant。 任何形式的回应都表示赞赏。
谢谢!
控制台文字:
C:\Users\Rahul>set ANT_HOME
ANT_HOME=C:\Users\Rahul\Downloads\apache-ant-1.8.4\bin
C:\Users\Rahul>set JAVA_HOME
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_05
C:\Users\Rahul>set PATH
Path=C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Clien
t\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)
\PC Connectivity Solution\;C:\Program Files\Common Files\Microsoft Shared\Window
s Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Wind
ows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowe
rShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\C
ommon Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxi
o Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.
0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\
QuickTime\QTSystem\;C:\Program Files (x86)\Android\android-sdk\tools\;C:\Users\R
ahul\Downloads\apache-ant-1.8.4\bin\;c:\Program Files (x86)\Microsoft SQL Server
\90\Tools\binn\;C:\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\auth\x86
\;C:\Program Files\Java\jdk1.7.0_05\bin\;C:\Program Files\Intel\WiFi\bin\;C:\Pro
gram Files\Common Files\Intel\WirelessCommon\;C:\Users\Rahul\Downloads\apache-an
t-1.8.4\bin\bin;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program F
iles (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\
2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;G:\adt-bundle-wi
ndows-x86_64\sdk\platform-tools;G:\adt-bundle-windows-x86_64\sdk\tools;C:\Progra
m Files (x86)\Subversion\bin;C:\Users\Rahul\Downloads\apache-ant-1.8.4\bin;C:\Pr
ogram Files\Java\jdk1.7.0_05\bin;C:\Program Files (x86)\OpenVPN\bin;C:\Program F
iles\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\grad
le-1.6-all\gradle-1.6\bin;C:\Program Files (x86)\Google\google_appengine\;C:\Use
rs\Rahul\Downloads\apache-ant-1.8.4\bin;C:\Program Files\Java\jdk1.7.0_05\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
C:\Users\Rahul>ant
ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
C:\Users\Rahul>
答案 0 :(得分:1)
ANT_HOME
实际上设置不正确,因为ANT_HOME
是指路径到ant安装目录,这是bin的父目录。你已经设置了路径up to bin,这是不正确的。
执行以下操作
ANT_HOME = C:\Users\Rahul\Downloads\apache-ant-1.8.4
答案 1 :(得分:0)
Ant Home应该是
ANT_HOME = C:\ Users \ Rahul \ Downloads \ apache-ant-1.8.4
同样在环境变量中编辑路径系统变量并向其添加以下路径
的; C:\ Users \用户的Rahul \下载\阿帕奇-ANT-1.8.4 \ bin中的的