title: Gdata API blogger example
body: <p>I'm having trouble running this sample code for the gdata java library:</p>
  
  <pre><code>import java.net.URL;
  import com.google.gdata.client.Query;
  import com.google.gdata.client.blogger.BloggerService;
  import com.google.gdata.data.Feed;
  
  public class AccessBloggerSample {
  
  public static void main(String[] args) throws Exception {
     BloggerService service = new BloggerService("Testing-Blogger");
     service.setUserCredentials("tmerachli@gmail.com", "XXX");
     System.out.println("Google: " + BloggerService.getVersion());
     URL feedUrl = new URL("http://minhchaunyc.blogspot.com/feeds/posts/default ");
     Query query = new Query(feedUrl);
     System.out.println("service: ");
     Feed resultFeed = service.getFeed(query, Feed.class);
     System.out.println("blogs: " + resultFeed.getEntries().size());
     }
  }
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <pre><code>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 AccessBloggerSample.main(AccessBloggerSample.java:23)
  Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
  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 AccessBloggerSample.main(AccessBloggerSample.java:23)
  at __SHELL0.run(__SHELL0.java:6)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at bluej.runtime.ExecServer$3.run(ExecServer.java:724)`
  </code></pre>
  
  <p>Any ideas why I'm getting this? I'm compiling and running my code through BlueJ and I extracted all the jar files into the lib directory of BlueJ and the code compiles.</p>