Fix building using Java