This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
S. Vijay wrote:
mine is Windows XP so it would be very helpful if anyone help me to provide a solution other than what mentioned.
hmm. good even I am using xp. as james said JAVA_HOME is used by some other application needs to find out where is java has been installed.if you want more specific answer then elaborate.
Joined: Jul 10, 2009
Ok I will explain in detail what I am trying to do
Please see the attachment image
When I change the Java home version then my jdk version gets changed if I use the Environment Variables from System Properties windows GUI.
For example if I am using JDK1.5 and if I change the JAVA_HOME version to JDK1.6 then the java version changes to the corresponding 1.6 version.
So in my application I created a combo box which displays the different java version and when the user selects the version of his choice and click the change button then my application has to change the java version to the corresponding version.
I tried the code which was mentioned in my first post. This makes change to the registry variable and I can see the corresponding changes in the environment variable settings but still I see previous java version used not the changed one.