Convert (and fix) JmxService from groovy to java