But when you say you need to use different versions, what does that have to do with installation? That has more to do with environment variables. I do not recommend setting the environment variables via the OS especially Windows. I make command launchers and exe launchers with the specific version I want to run. A sophisticated one can use the Windows registry settings. For most I simply set the path for just a particular cmd launch.
Typical example
set JAVA_HOME=c:\j2sdk1.5
set PATH=%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;C:\apache\xml-batik\resources;./schemas/mathml2
set JMFHOME=C:\JMF2.0
set JARPATH=.;
set BATIKPATH=./lib
set Xj3DPATH=c:/Xj3d/x3d
set CLASSPATH=./classes;./lib/TR/MathML2/dtd/java;./lib/xalan.jar;./lib/js.jar;./lib/batik-all-1.5.1.jar;./lib/js.jar;
rem ;./lib/xercesImpl.jar;./lib/xml-apis.jar;./lib/xmlParserAPIs.jar
java -ms128m -mx256m -server -cp %CLASSPATH% com.neuralworks.physics.Academy
if ERRORLEVEL GOTO dopause
GOTO endit
dopause:
java -version
pause
endit:
in 'run Academy.cmd'