Fixed java build issues.