The attached patch is built on top of the 1a patch attached to
DERBY-5808. It modifies BaseTestCase.execJavaCmd() so that it adds emma.jar to the classpath of the sub-processes when running with instrumented jars.
This isn't needed for most callers of execJavaCmd(), as they typically inherit the classpath from the parent process, which already contains emma.jar. The compatibility tests are a bit different, as they set the classpath of their sub-processes explicitly in order to be able to mix and match the different versions.
The compatibility tests ran successfully with instrumented jars when this patch, and the one for
DERBY-5808, were applied.