File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes WS_ANT JAVA HOME setup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WS_ANT JAVA HOME setup" Watch "WS_ANT JAVA HOME setup" New topic


Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385

We are migrating our application from Weblogic to WAS 8.5 JDK 7 64 bit and Im trying to modify the build script written in ant for our application.

We ran all the respective command to set JDK 7 as as default JDK for the profiles etc.But however when I run the build using ws_ant command,I see that the java version is 1.5 and I have set JAVA_HOME to IBM JDK 7 path but to no avail the command still uses Java 1.5 .

Can somebody help me to understand how to set up ws_ant so that it uses JDK 7?


Failure is not an option.
uday kantt

Joined: May 05, 2011
Posts: 26

Please can you be more clear. What is the current path of the java 7 and previous version of java. Where did you make the changes. This would help in giving the right answer.

Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385

This is what I did .Currently the application code is compiled using the JDK 4 provided by Weblogic server.

Below are the step I did to run the WAS on JDK 7

Installed the Developer Edition WAS 8.5

Created the profile and ran the managesdk command to make JDK 7 as the defaule JDK for all the profiles.(I can also verify that the cmdDefaultProperties which shows JDK 7 as the JVM)

Used ws_ant.bat as the ant tool for building my application.( this is where it is showing the java version as 1.5 instead of 1.7)

Our build scripts is below where we set JAVA_HOME which points to the JDK 7 dir in the WAS_ROOT dir

As a matter of fact, I put echo %JAVA_HOME% on ws_ant.bat before they call the Ant main class and I can see that the JDK version is 7 but some how when the Ant class is running it is picking JDK5

Let me know if you need any more details.
I agree. Here's the link:
subject: WS_ANT JAVA HOME setup
It's not a secret anymore!