Last updated 2004-06-28 by Roedy
Green ©1996-2004 Canadian Mind Products
Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
You are here : home : Java Glossary : F words : flipping JVMs.
SET JAVAHOME=J:\j2sdk1.4.2_04
Refer to %JAVA_HOME%\bin\java.exe and %JAVA_HOME%\bin\javac.exe in all your *.bat files.
The key is, to run a version of the JVM, the registry must be set up to point to it, and its java.exe, javaw.exe and javaws.exe must be in the C:\winnt\system32 directory as the first version encountered on the path. They can then use the registry to find the other related files.
@echo off echo capture.bat saving Java System state in C:\env\%1 C: md! \env\%1 cd \env\%1 REM export Java region of registry regedit /E java.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft" REM collect this version's java*.exe files copy C:\winnt\system32\java.exe copy C:\winnt\system32\javaw.exe copy C:\winnt\system32\javaws.exe REM collect the deployment.properties file for Java WebStart copy C:\Documents and Settings\Administrator\Application Data\Java\Deployment\deployment.properties dir REM -30-
@echo off echo restore.bat restoring Java System state from C:\env\%1 C: cd \env\%1 REM import Java region of registry regedit java.reg REM restore this version's java*.exe files copy java.exe C:\winnt\system32 copy javaw.exe C:\winnt\system32 copy javaws.exe C:\winnt\system32 Rem restore deployment.properties file for Java WebStart copy deployment.properties C:\Documents and Settings\Administrator\Application Data\Java\Deployment REM -30-
java.exe -version
Unfortunately javac.exe does not have a -version option, but you can get to recognize the different versions by what they display when you type javac -X. javaw.exe and javaws.exe don't have a -version option either, but once you get java.exe working the others are usually correct to.
home |
Canadian Mind Products | |||
| mindprod.com IP:[24.87.56.253] | ||||
| Your IP:[80.134.30.163] | ||||
| You are visitor number 690. | ||||
| Please send errors, omissions and suggestions | ||||
| to improve this page to Roedy Green. | ||||
| You can get a fresh copy of this page from: | or possibly from your local J: drive mirror: | |||
| http://mindprod.com/jgloss/flipping.html | J:\mindprod\jgloss\flipping.html | |||