2012-08-22 123 views
0

我已經從以下鏈接下載了Apache Ant文件「apache-ant-1.8.4-bin.zip」: - http://ant.apache.org/bindownload.cgi。 然後我增加了一個環境變量,以我的Windows 7操作系統: -無法安裝Apache Ant

Name = ANT_HOME Value = C:\ 

,但是當我輸入以下使用CMD命令行: -

C:\apache-ant-1.8.4-bin\apache-ant-1.8.4\bin>ant.bat 

我得到了以下錯誤: -

ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME. 

那麼可能會出現什麼問題? BR

回答

3

你的螞蟻的家是:

C:\apache-ant-1.8.4-bin\apache-ant-1.8.4\ 

該值創建環境變量ANT_HOME。之後不要忘記重新打開cmd窗口。

0

Per Krestens答案,您的ANT_HOME變量需要是解壓縮螞蟻的基本目錄。然後您的PATH(用戶或系統)需要添加

%ANT_HOME%\ bin;

這將允許你調用ant.bat(ant是如何在Windows系統上啓動的)。