A configured Squish installation can only work with one selected JRE.
In order to test applications with different Java versions, you must install multiple versions of Squish, each in its own directory. Then,before running any of these Squishs'
squish executables, make sure that the environment variable
SQUISH_USER_SETTINGS_DIR is set differently for each Squish installation.
The process can be simplified by using a batch file or shell script. For example:
The following points needs to be addressed for this approach to work:
For Squish 3, Squish generates a small JRE-specific
rt.jarfile during setup (
Squish sets the location of the JRE-specific
libjvm.sofile in the AUT environment.
Two exports are needed to override the ones from the setup:
SQUISH_JAVA_DEF_1 (to address point 1) and
SQUISH_LIBJVM (to address point 2).
When using the command line hooking, i.e. skipping the alternative jvm lib, the other
SQUISH_JAVA_DEF_X needs to be added to the java executable. Note that for jre-1.4, the SquishClassLoader setting is an extra
SQUISH_JAVA_DEF_N when using SWT.