Manually setting up Squish for Java

Last edited on

Manually setting up Squish for Java 6.1 and higher

For Squish 6.1 and higher see:

Manually setting up Squish for Java 6.0.x, 64-bit on Linux

Sometimes it is required to set up Squish without using its setup program. The following instructions explain how to do this for Squish for Java 6.0.x.

Step 1 - Create a file called .squish-3-license in the home directory of the user (typically %USERPROFILE% on Windows, and $HOME on Unix) and insert the Squish license key into it.

Step 2 - Delete <SQUISH_DIR>/bin/.not_configured

Step 3 - Generate <SQUISH_DIR>/lib/squishrt.jar:

java -classpath "<SQUISH_DIR>/lib/squishjava.jar:<SQUISH_DIR>/lib/bcel.jar" "com.froglogic.squish.awt.FixMethod" "<JAVA_DIR>/lib/rt.jar:<SQUISH_DIR>/lib/squishjava.jar" "<SQUISH_DIR>/lib/squishrt.jar"
Execute in a shell

Step 4 - Create entry "JavaHooking" in <SQUISH_CONFIG>/ver1/server.ini

bin/squishserver --config setJavaHookMethod java-options
Execute in a shell; while in Squish folder

Step 5 - Create entry JavaVM in <SQUISH_CONFIG>/ver1/server.ini

bin/squishserver --config setJavaVM "<JAVA_DIR>/bin/java"
Execute in a shell; while in Squish folder

Step 6 - Create entry JavaVersion in <SQUISH_CONFIG>/ver1/server.ini

bin/squishserver --config setJavaVersion "<JAVA_VERSION_STRING>"
Execute in a shell; while in Squish folder

(<JAVA_VERSION_STRING> stands for the version string output by "java -version" of the JRE executing the application, for example "1.8.0_71" (without double quotes).)

Step 7 - Create entry JavaWebStart in <SQUISH_CONFIG>/ver1/server.ini

bin/squishserver --config setJavaWebStart "<JAVA_DIR>/bin/java"
Execute in a shell; while in Squish folder

Step 8 - Create entry LibJVM in <SQUISH_CONFIG>/ver1/server.ini

bin/squishserver --config setLibJVM "<JAVA_DIR>/lib/amd64/server/libjvm.so"
Execute in a shell; while in Squish folder

Manually setting up Squish for Java 6.0.x on Windows

Sometimes it is required to set up Squish without using its setup program. The following instructions explain how to do this for Squish for Java 6.0.x.

Step 1 - Create a file called .squish-3-license in the home directory of the user (typically %USERPROFILE% on Windows, and $HOME on Unix) and insert the Squish license key into it.

Step 2 - Delete <SQUISH_DIR>\bin\.not_configured

Step 3 - Generate <SQUISH_DIR>\lib\squishrt.jar:

java -classpath "<SQUISH_DIR>\lib\squishjava.jar;<SQUISH_DIR>\lib\bcel.jar" "com.froglogic.squish.awt.FixMethod" "<JAVA_DIR>\lib\rt.jar;<SQUISH_DIR>\lib\squishjava.jar" "<SQUISH_DIR>\lib\squishrt.jar"
Execute in cmd.exe

Step 4 - Create entry "JavaHooking" in <SQUISH_CONFIG>\ver1\server.ini

bin\squishserver --config setJavaHookMethod java-options
Execute in cmd.exe; while in Squish folder

Step 5 - Create entry JavaVM in <SQUISH_CONFIG>\ver1\server.ini

bin\squishserver --config setJavaVM "<JAVA_DIR>\bin\javaw.exe"
Execute in cmd.exe; while in Squish folder

Step 6 - Create entry JavaVersion in <SQUISH_CONFIG>/ver1/server.ini

bin\squishserver --config setJavaVersion "<JAVA_VERSION_STRING>"
Execute in cmd.exe; while in Squish folder

(<JAVA_VERSION_STRING> stands for the version string output by "java -version" of the JRE executing the application, for example "1.8.0_71" (without double quotes).)

Step 7 - Create entry JavaWebStart in <SQUISH_CONFIG>\ver1\server.ini

bin\squishserver --config setJavaWebStart "<JAVA_DIR>\bin\javaws.exe"
Execute in cmd.exe; while in Squish folder

Step 8 - Create entry LibJVM in <SQUISH_CONFIG>\ver1\server.ini

If <JAVA_DIR>\bin\client\jvm.dll exists:

bin\squishserver --config setLibJVM "<JAVA_DIR>\bin\client\jvm.dll"
Execute in cmd.exe; while in Squish folder

If <JAVA_DIR>\bin\client\jvm.dll does not exist, but <JAVA_DIR>\bin\server\jvm.dll exists:

bin\squishserver --config setLibJVM "<JAVA_DIR>\bin\server\jvm.dll"
Execute in cmd.exe; while in Squish folder

Here is a batch file that can be put into the Squish folder and which performs the above steps. Prior to use it must be edited to have proper values for ARG_JAVA_DIR and ARG_JAVA_VERSION_STRING: setup-squish-java.bat