Fix Java compilation errors.