properly locate java and swig

also use the detected paths for java, swig and doxygen