ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: Specifying jdk compiler
Date Sun, 01 Jun 2003 15:28:21 GMT
Hi Rahamim,

I do not understand your question number 3.

For your question number 2 :
If you want to find the java version installed under a specific path in your
ant script, you can use the <exec/> task.
It has an outputproperty attribute, with which you can capture in a property
value the stdout produced by a program,
so
<exec executable="I:/Projects/JavaDevel/jdk1.4.1_02/java"
outputproperty="javaversioninfo">
   <arg value="-version"/>
</exec>
then you will have a property ${javaversioninfo} with version info.
Or maybe you want to write something in your classes to say with which
compiler you produced them ?
Antoine
----- Original Message -----
From: "Rahamim, Zvi (Zvi) ** CTR **" <rahamim@avaya.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Sunday, June 01, 2003 8:02 AM
Subject: Specifying jdk compiler


Hi!
I have an ant script that use the javac and rmic tasks.
They use the jdk that runs ant (I don't use fork in the javac task)
Now I want to use another compiler and I used fork and executable attributes
in the javac task but then the rmic task failed with the following error:
Cannot use SUN rmic, as it is not available.  A common solution is to set
the environment variable JAVA_HOME or CLASSPATH.
1. Can you tell me why it happens and how to solve it ?

I have jdk on my computer on a different pathes and with different versions
(e.g: I:/Projects/JavaDevel/jdk1.3.1_02/ and
I:/Projects/JavaDevel/jdk1.4.1_02/)
2. I know that I can use the javac executable attribute to compile with the
above compilers, but how can I get from withing the script their versions
(by now I've used the property value: "java.vm.version".
3. If I want to create a class for Javac_131_02 and Javac_141_02 that
compiles using the above jdk, how can I do it (except for extends
DefaultCompilerAdapter)?

Thanks in advance!!!

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



Mime
View raw message