ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: Basic problem using ANT
Date Mon, 28 Aug 2000 22:13:58 GMT
Howard,

You need to set the JAVA_HOME environment variable to point to your JDK
installation. When you do this ant knows how to find the tools.jar file
which contains the Sun javac compiler classes. These are not normally part
of the JDK's runtime classes.

Let me know if that doesn't get you up and running.

Conor


--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au

> -----Original Message-----
> From: Howard Burgett [mailto:HowardB@dataonair.com]
> Sent: Tuesday, 29 August 2000 4:38
> To: 'ant-user@jakarta.apache.org'
> Subject: Basic problem using ANT
>
>
> Hi All!!
>
> I have just started using ANT and am having a problem getting it
> to compile
> from a very basic build.xml.  My build.xml looks like:
>
> <project name="ref" default="compile" basedir=".">
>   <target name="init">
>     <tstamp/>
>     <property name="src" value="." />
>     <property name="classes"  value="." />
>   </target>
>
>   <target name="compile" depends="init">
>     <javac srcdir="${src}" destdir="${classes}"/>
>   </target>
>
> </project>
>
> I have a single file Test1.java to compile and ANT returns me the
> following
> exception:
>
> 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:681)
>         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)
>
> The output from ant -verbose (only for the process portion if its
> execution)
> is:
>
> Setting ro project property: ant.file -> C:\dev\ReferenceObjects\build.xml
> Setting project property: basedir -> C:\dev\ReferenceObjects
> Project base dir set to: C:\dev\ReferenceObjects
>  +Target: init
>    +Task: tstamp
> Setting project property: DSTAMP -> 20000828
> Setting project property: TSTAMP -> 1336
> Setting project property: TODAY -> August 28 2000
>    +Task: property
> Setting project property: src -> .
>    +Task: property
> Setting project property: classes -> .
>  +Target: compile
>    +Task: javac
> Build sequence for target `compile' is [init, compile]
> Complete build sequence is [init, compile]
> Executing Target: init
> Executing Target: compile
> Compiling 1 source files to C:\dev\ReferenceObjects
> Using classic compiler
> Compilation args: [-d, C:\dev\ReferenceObjects, -classpath,
> C:\dev\ReferenceObjects;C:\dev\ReferenceObjects;C:\j2sd
> kee1.2.1\lib\j2ee.jar;C:\jakarta-ant\lib\ant.jar;C:\jakarta-ant\li
> b\parser.j
> ar;C:\jakarta-ant\lib\jaxp.jar;C:\jdk1.2.2\lib\tools.jar,
> -sourcepath, C:\dev\ReferenceObjects]
> Files to be compiled:
>     C:\dev\ReferenceObjects\Test1.java
>
> The class referred to in the exception (sun.tools.javac.Main) is
> clearly in
> the tools.jar file, and the file is in the classpath above, so I
> am stumped.
> What is this exception saying?  Have any of you seen similar problems?
>
> Howard Burgett
> Wireless ASP Division
> Brience, Inc.
> 407-492-6155
>
>
>
>
>
>


Mime
View raw message