ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Quirk" <brian.qu...@ams.com>
Subject Re: java.lang.NoClassDefFoundError: sun/tools/javac/Main Error
Date Sun, 29 Dec 2002 18:29:18 GMT

Thanks for the reply. However, tools.jar is in the classpath. Here is the
portion of the build file that sets the classpath.  Any other ideas?
Thanks,
Brian

***************
<!-- Set Jar Properties -->
<property name="log4j.jar" location="${lib.dir}/log4j/log4j-1.2.6.jar"/>
<property name="jdom.jar" location="${lib.dir}/jdom/jdom.jar"/>
<property name="jaxp.jar" location="${lib.dir}/jaxp/jaxp.jar"/>
<property name="parser.jar" location="${lib.dir}/jaxp/parser.jar"/>
<property name="jconnect.jar" location="${lib.dir}/jconnect/jconn2.jar"/>
<property name="ssce.jar" location="${lib.dir}/ssce/ssce.jar"/>
<property name="etools.jar" location="${lib.dir}/stylereport/etools.jar"/>
<property name="sree_pro.jar" location="
${lib.dir}/stylereport/sree_pro.jar"/>
<property name="junit.jar" location="${lib.dir}/junit/junit.jar"/>
<property name="unittest.jar" location="${lib.dir}/junit/unittest.jar"/>
<property name="tools.jar" location="${silverstream.lib}/tools.jar"/>

<!-- Set Compile Classpath -->
<path id="compile.classpath">
      <pathelement location="${etools.jar}"/>
      <pathelement location="${tools.jar}"/>
      <pathelement location="${jconnect.jar}"/>
      <pathelement location="${jdom.jar}"/>
      <pathelement location="${ssce.jar}"/>
      <pathelement location="${jaxp.jar}"/>
      <pathelement location="${log4j.jar}"/>
      <pathelement location="${parser.jar}"/>
      <pathelement location="${sree_pro.jar}"/>
      <pathelement location="${junit.jar}"/>
      <pathelement location="${unittest.jar}"/>

      <!-- <pathelement location="${silverstream.lib}"/> -->
      <!-- This puts tools.jar in the classpath again, the above was just
to make sure it was getting in -->
      <fileset dir="c:/silverstream37/lib" casesensitive="false">
             <include name="*.jar"/>
             <include name="*.zip"/>
      </fileset>
</path>

***********



                                                                                         
                                             
                      malla@isrmail.isr                                                  
                                             
                      .umd.edu                 To:       Ant Users List <ant-user@jakarta.apache.org>
                                 
                                               cc:                                       
                                             
                      12/28/02 12:14 PM        Subject:  Re: java.lang.NoClassDefFoundError:
sun/tools/javac/Main Error                
                      Please respond to                                                  
                                             
                      "Ant Users List"                                                   
                                             
                                                                                         
                                             
                                                                                         
                                             





Looks like that you do not have tools.jar in the
${compile.classpath}. include that in the classpath and that
should work.

Vikas


---- Original message ----
>Date: Fri, 27 Dec 2002 19:34:38 -0500
>From: "Brian Quirk" <brian.quirk@ams.com>
>Subject: java.lang.NoClassDefFoundError:
sun/tools/javac/Main Error
>To: ant-user@jakarta.apache.org
>
>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:   <mailto:ant-user-
unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:ant-user-
help@jakarta.apache.org>
>

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

..





.

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


Mime
View raw message