title: Unknown Host Exception in Eclipse
body: <p>When i compile and run the below code i am getting unknown host exception thrown.</p>
  
  <pre><code>import java.net.*;
  import java.io.*;
  
  public class URLReader {
  public static void main(String[] args) throws Exception {
  
    String result="";
    // Create a URL for the desired page
    URL url = new URL("https://www.google.co.in/?gfe_rd=cr&amp;ei=URzCVNmFKIiBoAPlpoD4CA&amp;gws_rd=ssl#q=jbutton");
    // Read all the text returned by the server
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
    String str;
    while ((str = in.readLine()) != null) {
        // str is one line of text; readLine() strips the newline character(s)
        result += str;
    }
    in.close();             
  
   System.out.println(result);
   }
  </code></pre>
  
  <p>}</p>
  
  <p>How do i set the proxy for the above code (Https and HTTP)? I am running the above code in Eclipse Kepler.</p>