[Anthill] how to set JAVA_HOME in antscript build.xml

Naina Dani ndani17 at gmail.com
Wed Jul 2 12:00:25 CDT 2008


Hi Kenneth,

Thanks for the help.
The solution you have suggested seems good, but, I have two different
environments: Solaris and Windows. So, if I hardcode in the build.xml (
executable="${jdk1.4}/bin/javac">), windows will have a problem compiling
the code as it will not find the javac in the hardcoded location. Does
anybody has a workaround for this ?

Thanks and Regards,
Naina.


On Tue, Jul 1, 2008 at 5:06 PM, Kenneth Burgener <kenneth at mail1.ttak.org>
wrote:

> On 7/1/2008 2:25 PM, Naina Dani wrote:
>
>> So I want to set JAVA_HOME in build.xml of the project, so that JAVA_HOME
>> is set depending on the project being built. Can anybody give me an idea how
>> to do this ?
>>
>
>
> We have an old project that had to be built with the 1.4 compiler.  To do
> this we used the "executable" parameter to the javac task.
>
>
> <javac srcdir="${project.test}"
>  destdir="${build.test}"
>  source="1.4"
>  target="1.4"
>  debug="on"
>  deprecation="off"
>  optimize="on"
>  fork="yes"
>  executable="${jdk1.4}/bin/javac">
>  <classpath>
>     ...
>  </classpath>
> </javac>
>
>
> This might work for you.
>
> Kenneth
>
> _______________________________________________
> Anthill mailing list
> Anthill at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill/attachments/20080702/9287b19f/attachment-0002.htm


More information about the Anthill mailing list