Hi again,
I posted the message below yesterday ... I haven't gotten any replies yet.
So I am thinking that maybe nobody saw it. So I am posting it again

I appreciate any kind of help!
 

-----Original Message-----
From: Pinar Bicioglu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 1:27 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Setting the environment varibles and specifying targets in
th e <j avac> tag ??


Hre is what i have written in order to use a different compiler;

<target name="default" 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>

  <target name="asi-compile">
    <antcall target="default">
      <param name="build.compiler" value="${jdk122root}"/>
    </antcall>
  </target>

But it gives me the following error.
Buildfile: build.xml

asi-compile:

prepare:

default:

BUILD FAILED

D:\sandbox\Engineering\dev\java\build.xml:224: D:/jdk1.2.2 can't be found.
--- Nested Exception ---
java.lang.ClassNotFoundException: D:/jdk1.2.2
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java, Compiled Code)
        at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.resolveClassN
ame
(CompilerAdapterFactory.java:136)
        at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(C
omp
ilerAdapterFactory.java:122)
        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:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
Code)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java, Compiled
Code)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
Code)
        at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
        at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 4 seconds

Any idea why ??

Thanks a lot
-----Original Message-----
From: Pinar Bicioglu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:59 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Setting the environment varibles and specifying targets in
th e <j avac> tag ??


yes i know that the the classic compiler is java1.2. But in order to use
different compilers based on what Nica said, i need to know whether the
compiler I am using is external or one of the javac-compilers ??

Thanks a lot

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 12:00 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting the environment varibles and specifying targets in
th e <j avac> tag ??


depending on the java version.
classic compiler is java 1.2

-----Original Message-----
From: Pinar Bicioglu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 10:09 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Setting the environment varibles and specifying targets in
th e <j avac> tag ??


Ok here is the silliest question. How do I know what kind of compiler I am
using. ?? 
-----Original Message-----
From: Nico Seessle [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 4:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Setting the environment varibles and specifying targets in
th e <j avac> tag ??


----- Original Message -----
From: "Pinar Bicioglu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 9:59 PM
Subject: RE: Setting the environment varibles and specifying targets in th e
<j avac> tag ??


>
> I added the part below to one of targets in my build.xml file
>
> <target name="LifeSimulatorApplet-compile" depends="prepare">
>     <javac srcdir="${src-dir}"
>            destdir="${build-dir}"
>            classpath="${classpath}"
>            deprecation="on"
>            bootclasspath="${Java118Classes}"
>            target="1.1"
>            optimize="off"
>            includes="${LifeSimulatorApplet-compile-list}"
>     />
>   </target>
>
> And it works fine. I also have " <property name="build.compiler"
> value="classic"/> " on the top of the file. I'd just like to know if it's
> true that all of the targets I have, use jdk1.2.2 but LifeSimulatorApplet.
> What do you think? is it correct ?
>

All of the targets in your build.xml will use the same compiler.

You can use different compilers if you do *not* define the property
"build.compiler" in your build.xml and call your compile-targets using
antcall specifying <param name="build.compiler" value="yourCompiler"/> on
each call. But this will only work with external compilers.

If you use one of the javac-compilers Ant will currently always use the
compiler that was shipped with the JDK you use to run Ant.

Nico

Reply via email to