Discussion Locked

Ant Tool

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ant tool is similar to batch files in windows Environment.
It wil build all UNIX commands to run on windows environment.
we will build the target file something similar to this.

........
..........
< target name="dist" depends="compile">
< echo message="3 rd target" />
< mkdir dir="${dist}/lib" />

< jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>

And the error is something like this.

3 rd target
[mkdir] Created dir: D:\sri_ant\dist\lib
[javac] Compiling 1 source fileto D:\sri_ant\dist
[javac] Modern compiler is not available - using classic compiler

BUILD FAILED

I want ur help in this regard, and i donot know where iam doing the mistake.
pl. help me out.

5 replies

by paul field

It looks like ANT is having trouble finding the javac compiler.

First, check that you've set the JAVA_HOME environment variable to the path to your JDK installation (e.g. set JAVA_HOME=c:\jdk1.3). Exactly how you do this depends on whether you'reusing Windows 95/98/ME or Windows NT/2000.

Are you using the scripts in the 'ant' directory to run ant (i.e. ant\bin\ant.bat)? If not, you must ensure that the classpath you are using contains either classes.zip (for JDK1.1) or tools.jar (for JDK1.2 & 1.3).

Hope that helps...

This discussion is closed to new replies.