ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David" <achepat...@yahoo.es>
Subject How to compile the classes using the jdk1.3.1 compiler?
Date Thu, 04 Sep 2003 12:36:05 GMT
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


Mime
View raw message