$ ant --version
Error: JAVA_HOME is not defined correctly.
We cannot execute 헬愣헬愣0
헬愣헬愣0
Files
/bin/java
我将Ant提取到名为Ant
的文件夹中C:\ANT
我设置了环境变量
ANT_HOME with the path C:\Ant
JAVA_HOME with the path C:\Program Files (x86)\Java\jdk1.6.0_32
I checked my Java path is set correctly
and does return the correct message.
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
如何解决这个问题?
答案 0 :(得分:2)
您也可以在cygwin
转到
cd /cygdrive/c
ln -s /cygdrive/c/Program\ Files/jdk-xxx java
并更新.bashrc
export JAVA_HOME="/cygdrive/c/java"
export ANT_HOME="/cygdrive/c/ant"
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
答案 1 :(得分:0)
不是最终解决方案,但无法发表评论。
答案 2 :(得分:0)