Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the JDK version in the build.xml

Status
Not open for further replies.

kopite1

Programmer
May 30, 2003
1
0
0
GB
Hi,

How do I set the JDK version in the build.xml. I have tried using:

<property name=&quot;${ant.java.version}&quot; value=&quot;1.1&quot; />

..but that does not seem to be picked up at compile time, it just continues with the default JAVA_HOME set in my path.
 
A work-around solution would be a cmd file with following content (you probably have to remove the environment variable JAVA_HOME) :
Code:
set JAVA_HOME=D:\jdk1.3.1_01
set ANT_HOME=D:\Java\soft\jakarta-ant-1.4.1
set path=%path%;%ANT_HOME%\bin;%JAVA_HOME%\bin
cd C:\java\projects\... ==> your source-directory
ant -buildfile C:\Java\ant-scripts\build.xml 
pause
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top