pud: wireformat-java: improve java detection