Added modified Java code to support loading features