Added java target detection (untested)