You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "John Clark L. Naldoza" <nj...@ntsp.nec.co.jp> on 2000/08/23 09:28:27 UTC

Extended Problem...

I found out that my previous problem was due in part to my reckless
abandon as well as not RTFM..;-)

The next part though is really weird...  At least for me...;-(

Executing Target: prepare
Executing Target: compile
Compiling 1 source files to
/opt/jakarta-tomcat/webapps/cmnms/WEB-INF/classes
Exception in thread "main" java.lang.NoClassDefFoundError:
sun/tools/javac/Main
        at org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Compiled
Code)
        at org.apache.tools.ant.taskdefs.Javac.execute(Compiled Code)
        at org.apache.tools.ant.Target.execute(Compiled Code)
        at org.apache.tools.ant.Project.runTarget(Project.java:675)
        at org.apache.tools.ant.Project.executeTarget(Compiled Code)
        at org.apache.tools.ant.Main.runBuild(Compiled Code)
        at org.apache.tools.ant.Main.main(Compiled Code)


What could I be doing wrong...;-(


Cheers,


John Clark

Re: Extended Problem...

Posted by Barrie Treloar <Ba...@camtech.com.au>.
On Wed, 23 Aug 2000, John Clark L. Naldoza wrote:

> Exception in thread "main" java.lang.NoClassDefFoundError:
> sun/tools/javac/Main

Here is the problem.  You need to make sure that the
tools.jar/classes.zip file is included in your classpath.

Look at the ant sh file (or the ant.bat file).  It will automatically
find the file for you if you have JAVA_HOME set.  It should warn you
that this environment variable is not set and will cause the build to
fail with sun.* class not found errors.

Barrie
--
Barrie Treloar
____________________________________________________________________

  Barrie Treloar                      Phone: +61 8 8303 3300
  Senior Analyst/Programmer           Fax:   +61 8 8303 4403 
  Electronic Commerce Division        Email: barrie@camtech.com.au
  Camtech (SA) Pty Ltd                http://www.camtech.com.au
 --- Level 8, 10 Pulteney Street, Adelaide SA 5000, Australia. ---
____________________________________________________________________