java arrow detection