Fixing Java integration