remove redundant command
more nuance to java detection