Switching between JRE versions

I am using two applications one requires JRE 1.6 and other requires JRE 1.5. I have installed both versions of JRE in my system. Please let me know the procedure for changing the default versions of JRE to be run without uninstalling other.
[247 byte] By [KVJa] at [2007-10-3 8:05:51]
# 1

If you use Window:

you should check the Launch4j (http://launch4j.sourceforge.net/), this program can create .exe, and Launch4j have the Environment Variables parameter, you can create the parameter JAVA_HOME to each application.

if you use Unix:

You can create sessions and edit the JAVA_HOME for each session, and run your application since of each session

or

I'm not sure, but I believe you can create a "C" or "C++" program and execute command lines, and execute the command "SET JAVA_HOME=...", and next "java -cp ./dir/... classMain" or you can do this on a console

danjaredga at 2007-7-15 3:09:40 > top of Java-index,Desktop,Runtime Environment...