Integrate with Google calendar ?

Posted by Karthick on Stack Overflow See other posts from Stack Overflow or by Karthick
Published on 2010-06-10T10:05:17Z Indexed on 2010/06/10 11:02 UTC
Read the original article Hit count: 182

Filed under:

Hi all.I am using the following code to integrate with google calendar.

CalendarService myService = new CalendarService("CalService"); 
            myService.setUserCredentials("[email protected]", "xxxxxxx"); 
            URL feedUrl = new URL("https://www.google.com/calendar/feeds/default/private/"); 
            CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class); 
            System.out.println("Your calendars:"); 
            for (int i = 0; i < resultFeed.getEntries().size(); i++) { 
              CalendarEntry entry = resultFeed.getEntries().get(i); 
              System.out.println("\t" + entry.getTitle().getPlainText()); 
            } 

But it gives the Exception:

Invalid credentials
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [../../../src/share/back/util.c:820]

Help me to solve this. Can anyone please list the needed jar files to adding calendar events to Google calendar

© Stack Overflow or respective owner

Related posts about java