The EMMA code coverage tool can be used with Squish for Java to check the code coverage of the Squish tests of Java applications.
However, because EMMA writes its coverage information upon shutdown of the JVM that executes the Java application it is important that the Squish test scripts closes the Java application normally.
If you let your test script end without closing the application first, Squish will kill the JVM process, and the coverage information will not be saved by EMMA.
Additionally, to avoid that Squish test script executions ends before the application has completely quit, be sure to insert waitFor() and snooze() statements at the end of the test script. The snooze time should be large enough for some safety. (Of course you could also check the process list for whether the process is still there, too.)
So eventually the script should be somewhat similar to this: