Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2725

HTTP Error 407 Proxy authentication required

X-Received by 10.224.200.202 with SMTP id ex10mr1917513qab.8.1371619044762; Tue, 18 Jun 2013 22:17:24 -0700 (PDT)
X-Received by 10.50.114.138 with SMTP id jg10mr48162igb.16.1371619044719; Tue, 18 Jun 2013 22:17:24 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!j2no776591qak.0!news-out.google.com!y6ni3510qax.0!nntp.google.com!j2no776585qak.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.help
Date Tue, 18 Jun 2013 22:17:24 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=202.54.41.53; posting-account=K6YP5woAAABrdi2r-WsePi5gcJROmGkT
NNTP-Posting-Host 202.54.41.53
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <4e278766-6a91-48f5-860c-05ab188abe4b@googlegroups.com> (permalink)
Subject HTTP Error 407 Proxy authentication required
From ckarunprakash@gmail.com
Injection-Date Wed, 19 Jun 2013 05:17:24 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.help:2725

Show key headers only | View raw


I am trying to access the url by using this 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();

This is working fine in my window machine but this is not working in linux machine. i am getting eror like this

    Exception in thread "main" java.io.IOException: Server returned HTTP response code: 407 for URL: http://www.google.com/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at com.yahoo.Connection.main(Connection.java:31)

Even proxy settings are correct and i tried like this also

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

But Same Error and i tried to set the export http_proxy= in /etc/profile but no use

Any idea where it is going wrong. 

Back to comp.lang.java.help | Previous | NextNext in thread | Find similar | Unroll thread


Thread

HTTP Error 407 Proxy authentication required ckarunprakash@gmail.com - 2013-06-18 22:17 -0700
  Re: HTTP Error 407 Proxy authentication required Roedy Green <see_website@mindprod.com.invalid> - 2013-06-19 13:01 -0700
    Re: HTTP Error 407 Proxy authentication required Lothar Kimmeringer <news200709@kimmeringer.de> - 2013-06-30 22:15 +0200
  Re: HTTP Error 407 Proxy authentication required Lothar Kimmeringer <news200709@kimmeringer.de> - 2013-06-30 22:16 +0200

csiph-web