ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Everyone's favorite -- "Can't find classic compiler"
Date Thu, 01 Feb 2001 18:42:35 GMT

Just FYI, I discovered the solution to this problem.  People were placing a copy
of ant.jar under $JAVA_HOME/jre/lib/ext.  I don't know why anyone would do that,
but that's what caused the problem.  Thought I should post this as a potential
"gotcha" for anyone else who might be tempted to do the same.


|        |          David.Bailey@|
|        |   |
|        |                       |
|        |          01/30/01     |
|        |          12:16 PM     |
|        |          Please       |
|        |          respond to   |
|        |          ant-user     |
|        |                       |
  |                                                                            |
  |       To:                                  |
  |       cc:     (bcc: David Bailey/Lawson)                                   |
  |       Subject:     Everyone's favorite -- "Can't find classic compiler"    |

We have implemented ant as our standard Java build tool.  This means that we
have ~40 developers, each with their Windows server, doing refreshes, checkins
and builds.  We are running with Ant 1.2 and jdk1.3 on both NT 4.0 and Windows
2000 platforms.

One developer is running into the following problem:


WA G:\mainline\univ\java\src>make -f ant.mak
        ant -buildfile
g:\mainline\univ\java\src\com\lawson\rdtech\ant\build.xml -verbose
Ant version 1.2 compiled on October 24 2000

Buildfile: g:\mainline\univ\java\src\com\lawson\rdtech\ant\build.xml
Detected Java Version: 1.3
Detected OS: Windows 2000
Project base dir set to: G:\mainline\univ\java\src\com\lawson\rdtech\ant
Build sequence for target `main' is [main]
Complete build sequence is [main, clean, all]
    [javac] Compiling 1 source file to G:\mainline\univ\java\classes
    [javac] Modern compiler is not available - using classic compiler
    [javac] Using classic compiler
    [javac] Compilation args: -d G:\mainline\univ\java\classes -classpath
cepath G:\main
line\univ\java\src\com\lawson\rdtech\ant;G:\mainline\univ\java\src -extdirs
    [javac] File to be compiled:


g:\mainline\univ\java\src\com\lawson\rdtech\ant\build.xml:9: Cannot use
classic compiler,
as it is not available


I've encountered this problem before, and my understanding was that it is a
Class Loader issue which arises from not having
both ant.jar and tools.jar in one's CLASSPATH.  However, I modified the ant.bat
file to insure that those jar files were in the CLASSPATH,
and in fact, nearly at the front (I've designed the build.xml files so that our
Java classes directory is the first thing in the CLASSPATH).  This
change does not solve the problem.

Ant.jar and tools.jar do exist in the proper directories, and his JAVA_HOME
environment variable is set correctly.  I can't see any significant
configuration differences between his server (Windows 2000) and mine (NT 4.0),
and in fact we got a clean build on a different Windows 2000
machine which seems to have the same configuration data.  So what am I



View raw message