Here are my code:

package sample;

import java.net.URL;
import com.google.gdata.client.docs.DocsService;
import com.google.gdata.data.docs.DocumentListEntry;
import com.google.gdata.data.docs.DocumentListFeed;

public class GoogleDocsTest {
        /**
         * @param args
         */
        public static void main(String[] args) {
                try {
                        DocsService service = new DocsService("Document list 
test");

                        System.out.println("1");
                        service.setUserCredentials("[email protected]", 
"passwordnew");
                        System.out.println("2");

                        URL documentListFeedUrl = new 
URL("http://docs.google.com/feeds/
documents/private/full");

                        DocumentListFeed feed = 
service.getFeed(documentListFeedUrl,
DocumentListFeed.class);

                        for(DocumentListEntry entry : feed.getEntries()) {
                                System.out.println("Entry's content = " + 
entry.getTitle
().getPlainText());
                        }
                }
                catch (Exception ex) {
                        ex.printStackTrace();
                }
        }
}


The program never print "2" shows that the setUserCredentials() method
not finished.  At the same time, 100% CPU usage happened.

could anyone know this? I run this program from Eclipse IDE with Docs
plug-in.

Thanks a lot!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to