Problem of Google username/password Authentication in Java

When I was trying to connect Blogger service in my Java application, I got the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps
at com.google.gdata.wireformats.AltRegistry.(AltRegistry.java:118)
at com.google.gdata.wireformats.AltRegistry.(AltRegistry.java:100)
at com.google.gdata.client.Service.(Service.java:555)
at Main.main(Main.java:16)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 4 more

The following is my code. I was curious about what value "exampleCo-exampleApp-1" should be and spend a lot of time on finding the correct value.

	public static void main(String[] args) throws ServiceException, IOException {
		// TODO Auto-generated method stub
		GoogleService myService = new GoogleService("blogger", "exampleCo-exampleApp-1");
		myService.setUserCredentials("[email protected]", "mypassword");
	}

Actually, "exampleCo-exampleApp-1" can be anything, and it does not cause the problem. The problem is a missing .jar file called.

The two jar files required is:
gdata/java/lib/gdata-blogger-2.0.jar
gdata/java/deps/guava-11.0.2.jar

They are located in the client library which can be downloaded from: https://code.google.com/p/gdata-java-client/downloads/list

The problem is solved and now you can retrieve all blogs under your Google account, create a blog post, etc. by following examples in Google developer's guide.

Category >> Google API  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
<pre><code> 
String foo = "bar";
</code></pre>