Fix Java program detection