ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David" <achepat...@yahoo.es>
Subject RE: How to compile the classes using the jdk1.3.1 compiler?
Date Thu, 04 Sep 2003 12:54:54 GMT
I have tried to set the attribute compiler to the following values:
javac1.3, but I don't know if this values is possible or not, becauase the
documentation says that it is a alias. What does it means. Ant if I set the
value or compiler to javac1.3 will look on my machine my jdk1.3.1 compiler?
The verbose or debug mode just says:

 [javac] Using modern compiler

on debug or verbose mode I don't have information about which compiler is
using?

Thanks,

David

-----Mensaje original-----
De: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Enviado el: jueves, 04 de septiembre de 2003 14:44
Para: user@ant.apache.org
Asunto: RE: How to compile the classes using the jdk1.3.1 compiler?


>From the <javac> manual page:


It is possible to use different compilers. This can be specified by either
setting the global build.compiler property, which will affect all <javac>
tasks throughout the build, or by setting the compiler attribute, specific
to the current <javac> task. Valid values for either the build.compiler
property or the compiler attribute are:
- classic (the standard compiler of JDK 1.1/1.2) - javac1.1 and javac1.2 can
be used as aliases.
- modern (the standard compiler of JDK 1.3/1.4) - javac1.3 and javac1.4 can
be used as aliases.
- jikes (the Jikes compiler).
- jvc (the Command-Line Compiler from Microsoft's SDK for Java / Visual J++)
- microsoft can be used as an alias.
- kjc (the kopi compiler).
- gcj (the gcj compiler from gcc).
- sj (Symantec java compiler) - symantec can be used as an alias.
- extJavac (run either modern or classic in a JVM of its own).

...

Parameters
----------
compiler
The compiler implementation to use. If this attribute is not set, the value
of the build.compiler property, if set, will be used. Otherwise, the default
compiler for the current VM will be used. (See the above list of valid
compilers.)


Have you tried that?


Jan



> -----Original Message-----
> From: David [mailto:achepati67@yahoo.es]
> Sent: Thursday, September 04, 2003 2:36 PM
> To: Ant Apache User List
> Subject: How to compile the classes using the jdk1.3.1 compiler?
>
>
> Dear Members,
>
> I have installed the java 1.3.1 and 1.4.2, I am using the 1.4.2 for
> generating the documentation (using javadoc), but I have to
> compile and run
> my application for the 1.3.1 because I am using a library
> that work for this
> version only.
>
> My environment variable JAVA_HOME points to 1.4.2 so, when I
> invoke the task
> <javadoc> it invokes the javadoc of 1.4.2 version.
>
> The problem is when I want to invoke the task <javac>. The
> documentation
> confuses me a little bit. What are the really attribute I
> have to set in
> order to compile with my compiler 1.3.1?
>
> I have tried to compile with 1.4.2 but setting the attribute
> source to the
> value "1.3.", but I get a run time execution problem when I run my
> application, so the compatibility mode is not working so well I guess.
>
> The the <javac> documentation stays that you can set the
> property attribute
> target to the value "1.1" (that should be my case), I don't
> know if this
> attribute has to be set in combination of the attribute source.
>
> Then the documentation says that it is possible to use
> another compiler,
> setting the attribute compiler. The possible value for my
> case, should be
> "modern", but this value dosen't distinguish between the 1.3
> and 1.4, it
> says the values javac1.3 and javac1.4 should be used as
> aliases. It means
> that I can set the attribute compiler with  the value
> "javac1.3"? Then Ant
> will look to the instalation of my jdk 1.3.1 compiler and
> will execute this
> one?
>
> Also the documentation says that:
>
> It is possible to use different compilers. This can be
> specified by either
> setting the global build.compiler property, which will affect
> all <javac>
> tasks throughout the build
>
> but this property build.compiler, doesn't have any value
> assigned?, If I do:
>
>     <echo message = "$build.compiler =${build.compiler}"/>
>
> ant says to me that this property was not set. What kind of value such
> property can accept? It has to be the location of my java
> 1.3.1 compiler, or
> just the alias value: javac1.3?
>
> Thanks in advance,
>
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message