dcsimg
Ant is detecting a wrong java location
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Marc_Herren
Posted On:   Thursday, February 19, 2004 02:10 AM

Hi, I'm new to ant so it would be possible that I do a wrong manipulation. My problem is that ant is detectig a wrong java location. ant -v results in : Apache Ant version 1.5.2-23 compiled on November 12 2003 Buildfile: build.xml Detected Java version: 1.4 in: /usr Detected OS: Linux But my java location is : /usr/java/j2sdk1.4.2_03/ I've set the following env attributes : JAVA_HOME=/usr/java/j2sdk1.4.2_03/ JAVACMD=/usr/java/j2sdk1.4.2_03/bin/java But it doesn't help at all! How can I set this point this value to the correct location ? Tnx Marc    More>>

Hi,

I'm new to ant so it would be possible that I do a wrong manipulation. My problem is that ant is detectig a wrong java location.


ant -v results in :

Apache Ant version 1.5.2-23 compiled on November 12 2003

Buildfile: build.xml

Detected Java version: 1.4 in: /usr

Detected OS: Linux


But my java location is : /usr/java/j2sdk1.4.2_03/



I've set the following env attributes :


JAVA_HOME=/usr/java/j2sdk1.4.2_03/
JAVACMD=/usr/java/j2sdk1.4.2_03/bin/java


But it doesn't help at all!

How can I set this point this value to the correct location ?


Tnx


Marc    <<Less

Re: Ant is detecting a wrong java location

Posted By:   Joe_Zendle  
Posted On:   Tuesday, April 20, 2004 02:05 PM

I had a similar problem on redhat enterprise. Apparantly ant is installed from the RPM's in /usr/bin/ant, /usr/share/ant, etc. The version of ant installed is 1.5.2 which is old.

Find the rpm:

rpm -qa | grep ant

Now remove it entirely

rpm --erase

I think your installation should work now (i hope)

Re: Ant is detecting a wrong java location

Posted By:   Anonymous  
Posted On:   Friday, February 20, 2004 03:29 AM

BTW 1.5.2-23 is a very old version. 1.6.1 is the latest one. Maybe you want to update...

Re: Ant is detecting a wrong java location

Posted By:   Vijay_Kumar  
Posted On:   Friday, February 20, 2004 12:15 AM

Hi,


You need to set the path in the system environment variable. Like path=%JAVA_HOME%in; and remove other jdk paths from the path variable.


Please checkt the java version before running ant by using the command, java - version.


Hope this will solve ur problem.


Regards,

Vijay.

Re: Ant is detecting a wrong java location

Posted By:   Simon_Ablett  
Posted On:   Thursday, February 19, 2004 05:33 AM

Have you tried echoing out the value of JAVA_HOME prior to invoking ant just to make sure that your initial value hasn't subsequently been reset to '/usr'? Also, is '/usr/java/j2sdk1.4.2_03' a directory or a symbolic link
to '/usr' (unlikely I would think)?

Regards.
About | Sitemap | Contact