ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: How to set jdk version for ant
Date Wed, 24 Sep 2003 12:38:06 GMT
add this :


 export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar

or use the standard ant script.


Antoine
-----Urspr√ľngliche Nachricht-----
Von: Mikael Petterson (KI/EAB) [mailto:mikael.petterson@ericsson.com]
Gesendet: Mittwoch, 24. September 2003 14:30
An: 'Ant Users List'
Betreff: RE: How to set jdk version for ant


Hi,

I tried to add the following that you mentioned (Antoine).

So this is how my script looks like:

Script
-------
#!/bin/sh

JAVA_HOME=/app/jdk/1.4.2_01;export JAVA_HOME
echo ${JAVA_HOME}
PATH="$JAVA_HOME/bin:$PATH";export PATH
echo ${PATH}

# ant.jar is in the lib directory.
#java -version
java -cp ../lib/ant.jar org.apache.tools.ant.Main -debug -buildfile
../build/build.xml  all execute
------------

However my compliation, javac, seems to fail (using -debug option).

Any more ideas? What am I doing wrong here?

//Mikael

Ps.This is how it looks like under /app/jdk/1.4.2_01

bin/                         include/                     LICENSE
README.html
COPYRIGHT                    jre/                         man/
src.zip
demo/                        lib/                         README
THIRDPARTYLICENSEREADME.txt

ant output ( -debug)
---------------------

BUILD FAILED
file:/home/eraonel/xml2j/bin/../build/build.xml:52: Unable to find a javac
compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
        at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(C
ompilerAdapterFactory.java:139)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:835)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message