WIP: Java compatibility issues