Fix Java chart app detection logic