ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dirk.sches...@t-online.de (Dirk V. Schesmer)
Subject <javac>-tag problem with Sun JDK 1.4.x and ANT 1.4.1 and ANT 1.5
Date Thu, 15 Aug 2002 05:17:30 GMT
Hi all,
I have a problem using the <javac> tag when trying to get ANT 1.4.1 or
ANT 1.5 to work with Sun J2SDK 1.4.1 I'd like to ask you for help:

The ANT testscript below (build.xml) runs perfectly when using Sun JDK
1.3.x, but when using Sun JDK 1.4.x the ant tool tells me:

>J:\projects\ant\build.xml:22: Cannot use classic compiler, as it is
not
>available A common solution is to set the environment variable
>JAVA_HOME to your jdk directory.

My JAVA_HOME, ANT_HOME and Windows path entries are set 
correctly. OpSys is NT 2000 German.

Can you please tell me what I have to change to get it up and running
with j2sdk 1.4.x, as well?

Thanks for help,

Dirk V. Schesmer
----------------- build.xml -----------------
<!-- Simple Ant build script to test an Ant installation -->
<project name="TestInstall" default="run" basedir=".">
<target name="init">
<available file="ASimpleHelloObject.java"
property="ASimpleHelloObject"/>
</target>
<target name="ASimpleHelloObject" unless="ASimpleHelloObject"
depends="init">
<echo file="ASimpleHelloObject.java">
public class ASimpleHelloObject {
public static void main(String[] args) {
System.out.println("ASimpleHelloObject.main was called");
}
}
</echo>
<echo message="Wrote ASimpleHelloObject.java" />
</target>
<target name="compile" depends="ASimpleHelloObject">
<javac destdir="." srcdir="." debug="on" classpath=".">
<include name="ASimpleHelloObject.java"/>
</javac>
</target>
<target name="run" depends="compile">
<java classname="ASimpleHelloObject" classpath="." />
<echo message="Ant appears to be successfully installed" />
</target>
</project>

--
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