I have already seen this problem on the list before, but this time it seems to be 
caused by something else.

After installing jdk1.4 and Ant 1.4.1 in order to run an application with a large 
buildfile, I got these errors.

++++++++++++++++++++++

Buildfile: build.xml

init:

converter:
     [echo] java.class.path = 
/usr/ant/lib/jaxp.jar:/usr/ant/lib/crimson.jar:/usr/ant/lib/ant.jar:/usr/java/lib/tools.jar

    [javac] Compiling 4 source files to /home/stevec/examples/build/ejb/converter

    [javac] Modern compiler is not available - using classic compiler

Total time: 2 seconds

BUILD FAILED

/home/stevec/examples/build.xml:90: Cannot use classic compiler, as it is not 
available A common solution is to set the environment variable JAVA_HOME to your jdk 
directory.

++++++++++++++++++++++++++++++++++

The echo statement is something I added and is directly before the javac tag. It shows 
that tools.jar is in the classpath. JAVA_HOME is set correctly and the command line 
javac works without problems.

Why is Ant not finding the compiler? I also tried building with 
-Dbuildfile=/usr/java/bin/javac which did no good.

Steve

Reply via email to