Fixes to the Java shim (change history).