Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Tran Tuan Hung
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48917
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 882
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it,
thanks, thanks, thanks....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic