You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Johnson <ma...@gilanet.com> on 2001/03/08 21:19:17 UTC

mysterious error: "Cannot use classic compiler, as it is not

I'm trying to install tomcat on a system running Debian upgraded from
slink to potato. I've already installed the same version of tomcat
(3.2.1) on another box running potato, and on one running RH6.2.

When attempting to build from source, I get the error:  "Cannot use
classic compiler, as it is not available".

The only similar problem I can find in the archives seems to occur when
there is no PATH to javac. However, my PATH includes $JAVA_HOME/bin,
where javac resides. Eg,

mybox:# java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20001124 (JIT
enabled: jitc))

I've tried changing the <property name="build.compiler" value="classic">
line in build.xml, disabling the jit compiler, etc, to no avail.

Here's the mystery: I ran './bootstrap.sh' in the ant directory, and the
build failed with: "Cannot use classic compiler, as it is not
available". But when I reinstalled the SDK, ant bootstrapped
successfully! I immediately tried './build dist' in the servletapi (3.2)
src directory, and got the same error: "Cannot use classic compiler, as
it is not available".

Can you suggest what I am overlooking? I'm at the end of my rope, and
will be grateful for any response!

TIA, Mark




Re: mysterious error: "Cannot use classic compiler, as it is not

Posted by Stefan Bodewig <bo...@apache.org>.
Mark Johnson <ma...@gilanet.com> wrote:

> The only similar problem I can find in the archives seems to occur
> when there is no PATH to javac. However, my PATH includes
> $JAVA_HOME/bin, where javac resides. Eg,

You don't need javac in your PATH, but you need tools.jar in your
CLASSPATH. Usually Ant determines the location of it from JAVA_HOME
and adds it automatically, but something seems to be going wrong here.

Two things you could try

(1) Create a buildfile that does nothing but 

<echo message="${java.class.path}" />

Look whether tools.jar is in there - and try to find out, why it
isn't. 8-)

(2) Install Ant 1.3. You didn't say, which version of Ant you are
using, maybe you've been bitten by a bug that has been fixed since the
release of Tomcat 3.1?

Stefan