You have to have tools.jar added to your CLASSPATH. That should do the
trick.

- Jeff

-----Original Message-----
From: Danny Ayers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 5:15 AM
To: [EMAIL PROTECTED]
Subject: Problem with Ant, Win2k, JDK 1.3, tools.jar


Hi,
Apologies if this an familiar problem - I couldn't find the list archives.

I'm trying to do a simple Ant build of a project, but when it gets to javac
it gives me :

java.lang.NoClassDefFoundError: sun/tools/javac/Main
        at
org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java:527)
        at
org.apache.tools.ant.taskdefs.Javac.doModernCompile(Javac.java:542)
...

If I run javac from the command line it works, and I've tried adding
tools.jar to the classpath :

java  -classpath
tools.jar;C:\jakarta\ant\lib\ant.jar;. -Dant.home="C:\jakarta\ant"
org.apache.tools.ant.Main

Any suggestions?

Cheers,
Danny.


Reply via email to