You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Michael Brooke <mb...@magstarinc.com> on 2000/09/12 15:25:42 UTC
Trying to use build ...
Help,
Running Red Hat 6.2, Apache Web Server and Jakarta 3.1.
I am trying to compile my java source code using the build shell script using
a build.xml, but I keep getting the following message
Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
at org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java, Compiled Code)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java, Compiled Code)
at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
at org.apache.tools.ant.Project.runTarget(Project.java, Compiled Code)
at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled Code)
at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
at org.apache.tools.ant.Main.main(Main.java, Compiled Code)
Can anyone help me understand what I have done wrong.
Michael Brooke
Magstar Inc.
Re: Trying to use build ...
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "MB" == Michael Brooke <mb...@magstarinc.com> writes:
MB> Can anyone help me understand what I have done wrong.
You don't have java's runtime classes in your classpath. Add
$JAVA_HOME/lib/tools.jar to it and everything should be fine.
Stefan
Re: Trying to use build ...
Posted by Fergus Gallagher <Fe...@OrbisUK.com>.
Try setting $JAVA_HOME to root of java installation (e.g., /usr/java)
Or add <java-home>/lib/tools.jar explicitly to the build classpath
At 09:25 12/09/00 -0400, Michael Brooke wrote:
>Help,
>
>Running Red Hat 6.2, Apache Web Server and Jakarta 3.1.
>
>I am trying to compile my java source code using the build shell script using
>a build.xml, but I keep getting the following message
>
>Exception in thread "main" java.lang.NoClassDefFoundError:
>sun/tools/javac/Main
> at
> org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java, Compiled Code)
> at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java,
> Compiled Code)
> at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
> at org.apache.tools.ant.Project.runTarget(Project.java, Compiled
> Code)
> at org.apache.tools.ant.Project.executeTarget(Project.java,
> Compiled Code)
> at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
> at org.apache.tools.ant.Main.main(Main.java, Compiled Code)
>
>Can anyone help me understand what I have done wrong.
>
>Michael Brooke
>Magstar Inc.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: general-help@jakarta.apache.org
--
Fergus Gallagher
Orbis
http://www.orbisuk.com/
+44-(0)20-8987 0717