title: can anyone help me with reading data from google spread sheet in JAVA
body: <p>I am trying below code for fetching data from google spreadsheet, but getting error.. can anyone help me with fetching data from google spreadsheet</p>
  
  <pre><code>public class gsheet 
  {
      public static final String GOOGLE_ACCOUNT_USERNAME = "gmail-id";
      public static final String GOOGLE_ACCOUNT_PASSWORD = "password"; 
      public static final String SPREADSHEET_URL = "spread-sheet-URL";
  
  
        public static void main(String[] args) throws IOException, ServiceException
        {
          SpreadsheetService service = new SpreadsheetService("JAVA");
          service.setUserCredentials(GOOGLE_ACCOUNT_USERNAME, GOOGLE_ACCOUNT_PASSWORD);
          URL metafeedUrl = new URL(SPREADSHEET_URL);
          SpreadsheetEntry spreadsheet = service.getEntry(metafeedUrl, SpreadsheetEntry.class);
          URL listFeedUrl = ((WorksheetEntry) spreadsheet.getWorksheets().get(0)).getListFeedUrl();
          ListFeed feed = (ListFeed) service.getFeed(listFeedUrl, ListFeed.class);
          for(ListEntry entry : feed.getEntries())
          {
            System.out.println("new row");
            for(String tag : entry.getCustomElements().getTags())
            {
              System.out.println("     "+tag + ": " + entry.getCustomElements().getValue(tag));
            }
  
          }
  
        }
  
  }
  </code></pre>
  
  <p>i am getting below error on running my code</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps
      at com.google.gdata.wireformats.AltRegistry.&lt;init&gt;(AltRegistry.java:118)
      at com.google.gdata.wireformats.AltRegistry.&lt;init&gt;(AltRegistry.java:100)
      at com.google.gdata.client.Service.&lt;clinit&gt;(Service.java:555)
      at googlesheet.gsheet.main(gsheet.java:24)
  Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 4 more
  </code></pre>