Reputation: 1621
My question is the same, but I do not know how to set another JRE right in ant! I need to run scripts in console like "path-to-buil-xml/ant"
I do that in Eclipse and I select JRE that I need, but how to set it in console ant?
What the name of parameter?
eclipse: change jre that is used to run ant
I need to build my project in the conditions when I do not have Eclipse.
How to do that?
Upvotes: 0
Views: 6216
Reputation: 18704
In the console ant refers to the environment variable JAVA_HOME to find the JRE.
If you don't want to edit the system settings for the windows cmd console use (this will reset when you close the console)
SET JAVA_HOME=PATH_TO_JAVA_HOME
You can also set the jdk(via the javac coomand) an argument to the javac task:
<javac srcdir="${src}"
destdir="${build}"
fork="yes"
executable="/opt/java/jdk1.1/bin/javac"
/>
It really needs to be a jdk, if you need to compile.
Upvotes: 2