added method to fix java version