How to solve UnknownHostException error in google spreadsheet using the API?
<p>To develope a client applications, I need to read and modify worksheets and data in <code>Google Sheets</code>. I am facing with below issue:</p>

<pre><code>SpreadsheetService service = new SpreadsheetService("sheet1");
String sheetUrl = "https://spreadsheets.google.com/feeds/list/1XP3KQTboWCArbvH99XYEGsVOldc97NqFzKD MiEepXRA/default/public/values"; //Sheet url             
URL url = new URL(sheetUrl); // Get Feed of Spreadsheet url 
ListFeed lf = service.getFeed(url, ListFeed.class); //Error statement
</code></pre>

<p>Issue:</p>

<blockquote>
  <p>java.net.UnknownHostException: spreadsheets.google.com    at
  java.net.AbstractPlainSocketImpl.connect(Unknown Source)  at
  java.net.PlainSocketImpl.connect(Unknown Source)  at
  java.net.SocksSocketImpl.connect(Unknown Source)  at
  java.net.Socket.connect(Unknown Source)   at
  sun.security.ssl.SSLSocketImpl.connect(Unknown Source)    at
  sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)    at
  sun.net.NetworkClient.doConnect(Unknown Source)   at
  sun.net.www.http.HttpClient.openServer(Unknown Source)    at
  sun.net.www.http.HttpClient.openServer(Unknown Source)    at
  sun.net.www.protocol.https.HttpsClient.(Unknown Source)     at
  sun.net.www.protocol.https.HttpsClient.New(Unknown Source)    at
  sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown
  Source)   at
  sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
  Source)   at
  sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
  Source)   at
  sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown
  Source)   at
  com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:503)
    at
  com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
    at com.google.gdata.client.Service.getFeed(Service.java:1135)   at
  com.google.gdata.client.Service.getFeed(Service.java:998)     at
  com.google.gdata.client.GoogleService.getFeed(GoogleService.java:631)
    at com.google.gdata.client.Service.getFeed(Service.java:1017)   at
  test_project.test_demo.main(test_demo.java:35)</p>
</blockquote>