Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple JREs

 
Graham Mead
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I currently have a machine which has JRE 1.3.0 running on it (using the PATH variable) but need to run an application at the same time which requires JRE 1.4. I don't want the original app to be affected or use 1.4.
What is the most elegant way to run up the second app so that it uses 1.4 but doesn't affect anything else.
TIA Graham
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set up a bat file (or .sh file for unix) and set the path and classpath on the fly to point at the 1.4 JRE.
Something like myapp.bat
***********************************
PATH c:\jdk1.4\bin;c:\jdk1.4\MyApp;%PATH%;
java -cp .;c:\jdk1.4\MyApp;c:\jdk1.4\jre\lib\rt.jar;c:\jdk1.4\jre\lib\jaws.jar;c:\jdk1.4\jre\lib\i18n.jar;c:\jdk1.4\lib; myapp
 
Hari Gangadharan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may work out well in most platforms including Windows. I do the same thing. However, sometimes the Java versions may compain about the registry value:
HKEY_LOCAL_MACHINE/Software/Javasoft/Java Runtime Environment/CurrentVersion
I don't remember the exact error message (Something like registry value CurrentVersion found to be 1.3 expected 1.4), but many times I regedit and change this from 1.3 to 1.4 and back. I encountered this while using Windows NT.
[ February 03, 2003: Message edited by: Hari Gangadharan ]
 
Graham Mead
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers Cindy, thanks for the reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic