ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: Modern compiler not available
Date Wed, 05 Dec 2001 09:06:16 GMT
----- Original Message -----
From: "Sebastien Boving" <sebastien@cirquedigital.com>
To: <ant-dev@jakarta.apache.org>
Sent: Wednesday, December 05, 2001 2:41 AM
Subject: Modern compiler not available


> Some question regarding this error message ("Modern compiler not
> available"): How exactly does Ant determine no 'modern' compiler is
> available? My compiler _is_ modern, and the error message and debugging
> info don't provide me enough info to correct the problem.

1. If fork is set to true everything below is irrelevant...

2. If the property "build.compiler" is not set, the "modern" Compiler is
used if the Java-Version Ant detected is not 1.1 and not 1.2. Otherwise the
"classic" compiler is used.

3. Ant does a lookup (using Class.forName("com.sun.tools.javac.Main")) to
find the classes representing the modern compiler, if a
ClassNotFoundException is thrown it will output "Modern compiler is not
available - using classic compiler".

That's all.

> I have this error on my Win2k box, with several versions of Ant, several
> versions of JDK's, each time with a correct JAVA_HOME and a
> lib/tools.jar in it.

Hmm... looks good.

Can you run this "program"

public class CompTest {

    public static void main(String[] args) {
        try {
            Class.forName("com.sun.tools.javac.Main");
        } catch (ClassNotFoundException cnfe) {
            System.out.println("Modern Compiler not available");
        }
    }
}

with the settings you posted to verifiy that it's really Ant heaving
problems here?

Nico



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message