I have the following part in my build.xml file. 

<target name="LifeSimulatorApplet-compile" depends="prepare">
    <javac srcdir="${src-dir}"
           destdir="${build-dir}"
           classpath="${classpath}"
           deprecation="on"
           target="1.1.8"
           optimize="off"
           bootclasspath="${Java118Classes}"
           includes="${LifeSimulatorApplet-compile-list}"
    />
  </target>

When I run it it says;

"[javac] The release '1.1.8' is unknown to this compiler."

I included "<property file="build.properties" /> " part at the top of the
file and it looks like the following;

jdk118root=d:/jdk1.1.8
jdk122root=d:/jdk1.2.2

Java122Classes=${jdk122root}/jre/lib/rt.jar
Java118Classes=${jdk118root}/lib/classes.zip

My environment has been set to 1.2.2 though. Because LifeSimulatorApplet is
the target that i wish to use a different jdk than what i am running Ant
with.
Any ideas?



-----Original Message-----
From: Pinar Bicioglu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 10:53 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Using JDKs with jar files




-----Original Message-----
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 12:17 PM
To: [EMAIL PROTECTED]
Subject: Re: Using JDKs with jar files


--- [EMAIL PROTECTED] wrote:
> The only way I know of to accomplish this would be to use two separate
> build files instead of two separate targets.  It would be nice to be
> able to specify the JDK to use (overriding the project attribute) for a
> specific java command like (java, javac, etc.).

For the <java> task, you can specify the "jvm" attribute with the
full-path of the 'java' executable in order to use a different one from
what you're running Ant with (you need to also specify fork="yes"). For
the <javac> task, you should be able to turn off the inclusion of the
system and Ant classes and just specify the classes you want to use for
the JDK you want to compile against.



Please correct me if I am wrong. in the <javac> task I can only use
supported versions of JDKs right? such as 1.1, 1.3 ... However I'd like to
compile one of my targets in build.xml file woth JDK 1.1.8 ? is this one of
the versions that <javac> task supports? because I read in the Ant user's
manual that if I want to use a different compiler interface than jdk1.1, 1.2
or 1.3 or jikes , I need to write a class that implements the
CompilerAdapter interface

Thanks
Pinar-

Reply via email to