I've installed Ant 1.2 on a Red Hat Linux system, using the binary
from the Ant web site. The error message I'm getting is apparently a
typical one:
Cannot use classic compiler, as it is not available
I looked through the archives for the mailing list, and followed the
tips I found there (add tools.jar to the CLASSPATH; make sure you've
got the environment variables set; make sure ant.jar isn't in the
jre/lib/ext directory; make sure ant.jar is in your CLASSPATH; make
sure the 'java' that's getting run is the same one that belongs to the
JAVA_HOME) all to no avail.
Any help? I've included more detailed information below.
Here's the relevant snippet from setenv:
CLASSPATH=/usr/local/jdk-1.2.2/lib/tools.jar:/usr/local/mysql/lib/mm.mysql.jdbc-1.2b/:/usr/local/apache/libexec/ApacheJServ.jar:/usr/local/JSDK2.0/lib/jsdk.jar:.
ANT_HOME=/usr/local/ant
JAVA_HOME=/usr/local/jdk-1.2.2
(I added the tools.jar after reading the mailing list archive; ant
didn't work without it, either.)
Here's the build.xml file:
<project name="extranet" default="compile">
<property name="src" value="." />
<property name="build" value="build" />
<target name="prepare">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="compile" depends="prepare">
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="clean">
<!-- Delete the ${build} directory tree -->
<delete dir="${build}" />
</target>
</project>
Here's the output from ant -v:
Ant version 1.2 compiled on October 24 2000
Searching for build.xml ...
Searching in /home/mlk/cvswork/temp/extranet
Buildfile: /home/mlk/cvswork/temp/extranet/build.xml
Detected Java Version: 1.2
Detected OS: Linux
Project base dir set to: /home/mlk/cvswork/temp/extranet
Build sequence for target `compile' is [prepare, compile]
Complete build sequence is [prepare, compile, clean]
[javac] Compiling 14 source files to /home/mlk/cvswork/temp/extranet/build
[javac] Using classic compiler
[javac] Compilation args: -d /home/mlk/cvswork/temp/extranet/build -classpath
/home/mlk/cvswork/temp/extranet/build:/usr/local/mysql/lib/mm.mysql.jdbc-1.2b:/usr/local/apache/libexec/ApacheJServ.jar:/usr/local/JSDK2.0/lib/jsdk.jar:/home/mlk/cvswork/temp/extranet:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/jaxp.jar:/usr/local/ant/lib/parser.jar
-sourcepath /home/mlk/cvswork/temp/extranet
[javac] Files to be compiled:
/home/mlk/cvswork/temp/extranet/ControllerServlet.java
[and so forth -- edited for brevity]
BUILD FAILED
/home/mlk/cvswork/temp/extranet/build.xml:11: Cannot use classic compiler, as it is
not available
--
Mike Kozlowski
[EMAIL PROTECTED]