Results 1 to 3 of 3
  1. #1
    arun_LT is offline Member
    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Exclamation HTTP Error 407 Proxy authentication required

    I am trying to access the url by using this code

    Java 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

    Java Code:
      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.

  2. #2
    arun_LT is offline Member
    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Default HTTP Error 407 Proxy authentication required

    I am trying to access the url by using this code

    Java 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

    Java Code:
      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.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: HTTP Error 407 Proxy authentication required

    Please go through the Forum Rules, particularly the second paragraph. I've merged your two threads here.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 0
    Last Post: 05-08-2013, 09:07 AM
  2. connection with authentication proxy
    By rioz in forum Networking
    Replies: 6
    Last Post: 02-15-2011, 01:05 AM
  3. Proxy authentication using HttpClient 4.0.3
    By Jsharma in forum Advanced Java
    Replies: 0
    Last Post: 01-21-2011, 03:33 AM
  4. error 530 error authentication required
    By rgale in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 05-12-2008, 04:28 PM
  5. JavaMail:Authentication required error
    By bbq in forum Advanced Java
    Replies: 1
    Last Post: 07-05-2007, 04:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •