Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

running ant in cygwin return JAVA_HOME incorrect setting

Tags:

java

ant

$ ant --version

Error: JAVA_HOME is not defined correctly.
  We cannot execute 헬愣헬愣0
헬愣헬愣0
Files
/bin/java

I extract Ant into a folder called Ant

C:\ANT

I set-up the environmental variables

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)

How to solve this?

like image 767
alex Avatar asked Jun 11 '26 17:06

alex


1 Answers

You can also in cygwin just go to

cd /cygdrive/c
ln -s /cygdrive/c/Program\ Files/jdk-xxx java

and update .bashrc

export JAVA_HOME="/cygdrive/c/java"
export ANT_HOME="/cygdrive/c/ant"
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
like image 150
Kallejohan Avatar answered Jun 14 '26 07:06

Kallejohan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!