You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Brian Quirk <br...@ams.com> on 2002/12/28 01:34:38 UTC

java.lang.NoClassDefFoundError: sun/tools/javac/Main Error

Hi -

Ant compiles beautifully when I use JDK 1.3.0_02. However, I'm trying to
use a different compiler and receive the following error:

****************************
compile:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 705 source files to c:\ant_test\build\classes
[javac] Since fork is true, ignoring compiler setting.
[javac] java.lang.NoClassDefFoundError: sun/tools/javac/Main
[javac] Exception in thread "main"

BUILD FAILED
*****************************

Here is my build file snippet:

<target name="compile" depends="init" description="Compile the source
code">
      <!-- Compile the java code from ${src.dir} into ${build.dir} -->
      <javac srcdir="${src.dir}"
             destdir="${build.dir}"
             fork="yes"
             executable="c:/silverstream37/jre/bin/javac"
             compiler="javac1.2">
             <classpath refid="compile.classpath"/>
      </javac>
</target>

I believe this is related to tools.jar, but aren't sure how to get around
the issue. Any advice is very appreciated.

Thanks,
Brian

- ps - I hope I haven't done something too stupid - I am very new to ANT.





.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>