So I set JAVA_HOME to d:/jdk1.1.8 and added the part above to one of the
targets in my xml file.
<target name="LifeSimulatorApplet-compile" depends="prepare">
<javac srcdir="${src-dir}"
destdir="${build-dir}"
classpath="${classpath}"
deprecation="on"
optimize="off"
target="1.2"
bootclasspath="${Java122Classes}"
includes="${asi-compile-list}"
excludes="**/lite*.java,**/Lite*.java"/>
</target>
I expected "asi-compile" to get executed with jdk1.1.8 ... But instead I got
the following error;
D:\sandbox\Engineering\dev\java>ant LifeSimulatorApplet-compile
Buildfile: build.xml
prepare:
LifeSimulatorApplet-compile:
[javac] Compiling 38 source files to D:\sandbox\Engineering\dev\java\lib
[javac] javac: invalid flag: -bootclasspath
[javac] use: javac
[-g][-O][-debug][-depend][-nowarn][-verbose][-classpath path][-nowr
ite][-deprecation][-d dir][-J<runtime flag>] file.java...
BUILD FAILED
D:\sandbox\Engineering\dev\java\build.xml:529: Compile failed, messages
should have been p
rovided.
Total time: 3 seconds
Thanks
-----Original Message-----
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 12:49 PM
To: [EMAIL PROTECTED]
Subject: Re: Setting the environment varibles and specifying targets in
the <j avac> tag ??
--- Pinar Bicioglu <[EMAIL PROTECTED]> wrote:
> I have been working on executing targets with different JDKs for a while
> now. If I add
> "<property name="build.compiler" value="modern"/>" to the top of my
> xml file, all of the targets in it get executed with JDK1.3 right?.
Yes -- once you set a property, it's set project-wide.
> Then what happens if I put
>
> <target name="asi-compile" depends="prepare">
> <javac srcdir="${src-dir}"
> destdir="${build-dir}"
> classpath="${classpath}"
> deprecation="on"
> optimize="off"
> target="1.2"
> bootclasspath="${Java122Classes}"
> includes="${asi-compile-list}"
> excludes="**/lite*.java,**/Lite*.java"/>
> </target>
> in one of the targets in the file while I still specify
> the <property name> tag in the tab?
The "target" attribute is just a flag to pass to 'javac' (if you run the
command 'javac --help' on a command line, you'll see the flag
description).
> And how is it related with setting the environment variables from
> control panels --> System ??
Ant properties aren't related to environment variables. (You can create a
relationship between them, but they're not automatically related.)
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/