HTTP Fehler 407 Proxy-Authentifizierung erforderlich

Ich versuche auf die url zugreifen, indem dieser code

System.setProperty("http.proxyHost", "111.88.15.108");
    System.setProperty("http.proxyPort", "8002");
    System.setProperty("http.proxyUser", "user");
    System.setProperty("http.proxyPassword", "password");
    URL oracle = new URL("http://www.google.com/");
    URLConnection yc = oracle.openConnection();
    BufferedReader in = new BufferedReader(new InputStreamReader(
            yc.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null)

        System.out.println(inputLine);
    in.close();

Dies ist in Ordnung, die in mein Fenster Maschine, aber dieser funktioniert nicht auf linux-Rechner. ich bin immer eror wie diese

Exception in thread "main" java.io.IOException: Server returned HTTP response code: 407 URL: http://www.google.com/
bei der sun.net.www.Protokoll.http.HttpURLConnection.getInputStream(Unknown Source)
bei com.yahoo.- Verbindung.(Haupt-Verbindung.java:31)

Auch die proxy-Einstellungen korrekt sind, und ich habe versucht, wie dies auch

java -Dhttp.proxyHost="111.88.15.108" -Dhttp.proxyPort="8002" -Dhttp.proxyUser="user" -Dhttp.proxyPassword="password"  -jar yahoo_test3.jar

Aber der Gleiche Fehler und ich habe versucht, legen Sie die export http_proxy= in /etc/profile aber keine Verwendung

Irgendeine Idee, wo es schief läuft.

  • Sie wahrscheinlich benötigen, um Ihre Linux-Maschine, die mit Ihrem Unternehmen Active Directory-Authentifizierung-system.
InformationsquelleAutor Arun | 2013-06-19
Schreibe einen Kommentar