The attached patch (d5808-1a.diff) makes the following changes:
Make it possible to specify which Java executable to use when invoking execJavaCmd() (since the compatibility test mixes multiple Java versions).
Update call to execJavaCmd() to match the new signature.
Replace all calls to Runtime.exec() with calls to BaseTestCase.execJavaCmd().
I ran derbyall + suites.All + compatibility test successfully with the patch.