Fix Java compilation