Moved JavaExtension to use the new API.