Fixed Java detection bug.