java detect