Convert to java