S
susinmn
Делаю так:
На conn.connect() ловлю:
Код:
System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "ip" );
System.getProperties().put( "proxyPort", "порт" );
URL url = new URL("путь к файлу");
URLConnection conn = url.openConnection();
String password = "логин:пароль";
conn.setRequestProperty( "Proxy-Authorization", password );
conn.connect();
На conn.connect() ловлю:
Код:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:352)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:214)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:201)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:378)
at java.net.Socket.connect(Socket.java:537)
at java.net.Socket.connect(Socket.java:487)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
at sun.net.www.http.HttpClient.New(HttpClient.java:307)
at sun.net.www.http.HttpClient.New(HttpClient.java:278)
at COM.ibm.JEmpower.applet.http.HttpURLConnection.connect(HttpURLConnection.java:315)
at JavaAgent.NotesMain(Unknown Source)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(Unknown Source)