Overview¶
By default Squish hooks into Java applications by providing a customized Java VM shared library, the Squish Java VM.
The Squish Java VM (in SQUISHDIR\bin\jvm.dll
on Windows) is used for hooking Java applications transparently with Eclipse-based applications and for applications which are being run via java.exe
, javaw.exe
, etc.
If this hooking method does not work (because the launcher does not offer an option to specify the Squish Java VM directory (for Eclipse the -vm
option is used) hooking can usually also be managed by providing additional Java VM parameters to the custom launcher.
For java or java.exe¶
For applications starting java
or java.exe
via scripts or batch files you can try to get hooking to work "manually". In the script or batch file that runs java
(or java.exe
on Windows) do the following:
Step 1 - Unset the environment variables JDK_ALTERNATE_VM
and _JAVA_OPTIONS
before executing Java
For Windows:
For bash shells on Unix systems:
Step 2 - Modify how Java is invoked
If the invocation looks like this:
On Windows, change it to:
And on Unix systems, change it to:
For Eclipse or launchers created by Eclipse¶
Create a batch file or shell script similar to this:
Windows batch file:
Unix shell script:
You can also provide these -vmargs
in the eclipse.ini
file (or in the application's own myapp.ini
file), but some people consider this to be intrusive.
For launchers created by NetBeans and install4j¶
Step 1: Create a batch file or script
On Windows:
Create a file called myapp_squish.bat
and save it in the same directory as the .exe
file of your application (e.g. "C:\Program Files\MyApp\bin\myapp_squish.bat
".
The file should have the following contents:
Of course you need to replace "myapp" with the actual file name that starts your application.
On Unix:
Create a file called myapp_squish.sh
and save it in the same directory as the file that starts your application (e.g. "\opt\myapp\bin\myapp_squish.sh
".
The file should have the following contents:
Of course you need to replace "myapp" with the actual file name that starts your application.
Step 2: Set the AUT to the batch file or shell script
In the test suite's settings set myapp_squish.bat
or myapp_squish.sh
as the Application Under Test.
In addition, make sure that you run Squish's setup program (SQUISHDIR/bin/squishconfig
), and point it to the folder of the JRE that your application is using.
When hooking still fails¶
When hooking your application still fails please check which JRE your application uses (see Finding the JRE that executes a Java application ), run Squish's setup program again and specify exactly that JRE in it.
If hooking still fails please contact froglogic support and attach the .bat file/shell script as well as the file server.ini
(Windows: %appdata%\froglogic\Squish\ver1
; Unix: $HOME/.squish/ver1
) to your email.