[ref] use java scanner