enable java detection
improve java detection