ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Wickson <andywick...@gmail.com>
Subject Re: Specifying the java runtime for Ant
Date Thu, 15 Sep 2005 12:24:22 GMT
I am really trying to get Ant itself to run using a non-default java runtime 
(one I specify). The reasons are very convoluted and I won't bore you with 
them.
There seems to be something in the docs about this but I get the feeling 
things may have changed recently. I have seen talk of a .antrc file in which 
you can specify env. vars. such as JAVACMD but i have no such file. The 
manual also mentions running from java which may of help but I've tried 
every combination of the following:
java/142/bin/java -Dant.home=$$ANT_HOME org.apache.tools.ant.Main
java/142/bin/java -Dant.home=apache-ant-1.6.5/bin/ant 
org.apache.tools.ant.Main
etc
but always get:
The java class is not found: org/apache/tools/ant/Main
even though i can see it there in the jar file.

Thanks,
Andy




On 9/15/05, Barry White <bwhite@fotango.com> wrote:
> 
> Hi Andy,
> 
> are you just trying to ensure that your sources will compile to be, say,
> 1.3 compliant? This was a problem that I faced for a while and I believe
> it was solved on this mailing list. I thought specifying
> source/target=1.3 should or would be enough but it is not - you have to
> specify the bootclasspath:
> 
> <javac source="1.3"
> target="1.3"
> bootclasspath="C:/Java/jdk1.3.1_16/jre/lib/rt.jar"
> srcdir="${source}"
> destdir="${classes}" />
> 
> Hoping that this was your problem ;)
> 
> Barry
> 
> 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.
> >
> > Thanks,
> > Andy
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message