ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Specifying the java runtime for Ant
Date Thu, 15 Sep 2005 11:02:27 GMT
Andy Wickson wrote:
> Hi,
> 
> I know that using <javac ..... executable=<PATH TO JAVAC>
> I can specify the javac that I want to use for a compilation but is it 
> possible to do this the other way round?
> 
> I.e., I want to explicitly specify to Ant the runtime to use for itself at 
> startup (one which it won't find as default in the $PATH) and then use the 
> default javac for the compilation itself. 
> 

lets think about this for a minute.

you want an option, presumably something like -runtime=1.4 or 
-runtime=/usr/share/java/1.4 which ant (a java program) will use to 
determine the runtime it runs under.

i.e. you want a java program to be able to dynamically decide which 
runtime to run under.

This isnt possible. Which leaves making changes to the java startup 
scripts. Those scripts are scary and complex enough as it is, believe 
me, and they lead to many more support calls than 200 lines of code 
ought to, especially from systems/configurations you dont expect to be 
running Ant.

Its much easier just to edit the path. Have some script that changes 
your JAVA_HOME, JDK_HOME, PATH env options for a particular shell; run 
that in whichever shell you want to call ant from later.

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


Mime
View raw message