automatically detect java home