wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes How to set only one version of jre on my Computer? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to set only one version of jre on my Computer?" Watch "How to set only one version of jre on my Computer?" New topic
Author

How to set only one version of jre on my Computer?

Tran Tuan Hung
Ranch Hand

Joined: Apr 08, 2007
Posts: 59
In my Computer, i install three version of jre so i want to set a desired jre version, how to do that? May be i must set in control panel???
Thanks and best regard,
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38441
    
  23
As far as I know, the computer searches through the PATH environment variable from left to right until it finds an executable matching the requisite name, in this case "java". So try putting the version you want first in the PATH. Test it with java -version at a terminal/command prompt.
Tran Tuan Hung
Ranch Hand

Joined: Apr 08, 2007
Posts: 59
can you explain more clearly? in fact, my computer had 3 jre versions(jre1.5.0_07, 1.5.0_09, 1.6.0_03) been installed. now the jre1.6.0_03 is using, how can i change to jre1.5.0_07???
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 685
On Windows XP, the jre install puts a java.exe file in the Windows/System32 folder which is often at the head of the PATH. I've swapped between jre versions by copying the java.exe file from the bin for the version I want to use to the Windows\System32 folder. Somehow the java.exe uses the Registry to find the rest of the stuff it needs.
I also did the above on Windows 98, but with a different folder.
Tran Tuan Hung
Ranch Hand

Joined: Apr 08, 2007
Posts: 59
i got it,
thanks, thanks, thanks....
 
Consider Paul's rocket mass heater.
 
subject: How to set only one version of jre on my Computer?