You need to check the the /usr/java directory. It could be a symbolic link
to another directory.
Give the actual directory in the classpath.

Cheers,
Sujan

-----Original Message-----
From: stephen.chambers [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 9:03 AM
To: [EMAIL PROTECTED]
Subject: JDK1.4 and Ant1.4.1 can't find javac on Solaris 8


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/jav
a/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

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to