Improved Java interop