How to use automatic proxy configuration script in Java
问题 My Internet Explorer is set to have an automatic proxy file(so-called PAC) for web access. Is there a way to use this on my Java program, also ? My below Java code does not seem to use proxy at all. ArrayList<Proxy> ar = new ArrayList<Proxy>(ProxySelector.getDefault().select(new URI("http://service.myurlforproxy.com"))); for(Proxy p : ar){ System.out.println(p.toString()); //output is just DIRECT T.T it should be PROXY. } I also set my proxy script on Java Control Panel(Control->Java), but