Using the Google Calendar (GData) Java APIs in NetBeans


I'd be lost without my Palm device, I've struggled many times with synchronization and wish I could master this sync process myself. So when Google announced their calendar service I felt like I needed to give it a try. Here's my simple setup to use the GData APIs in the NetBeans IDE.

First, download the GData client library from http://code.google.com/apis/gdata/gdata.zip.
It contains client APIs, documentation and source code for both Java and C#. Extract the archive to $GDATA_HOME.

In NetBeans, go to Tools -> Library Manager -> "New Library"
Give the new library any name (such as "GData library").

In the "Classpath" tab, select "Add JAR/Folder..." and add the following jar files:
- $GDATA_HOME/java/lib/gdata-calendar-1.0.jar
- $GDATA_HOME/java/lib/gdata-client-1.0.jar



In the "Sources" tab\*, add $GDATA_HOME/java/src and in the Javadoc tab, add $GDATA_HOME/doc/javadoc.
Dismiss the window.

Add this new library to your project (Properties->Libraries or the "Add Library" on the project's Libraries node),



and start coding with code completion, online Javadoc (very useful with any new API) and source debug\* :



More info on this pretty exiting API here: http://code.google.com/apis/gdata/index.html

Make also sure all of this uses Java 5 (I've had trouble with Java 6 for some reason with odd server-side JNI messages...) and that you are familiar with the xsd:date and xsd:dataTime formats (hint: use XMLGregorianCalendar and pay attention to timezones!).

\* : Note having the sources defined in the library will only let you debug the GData classes if you recompile them with -g.
In that case simply use the build.xml ANT file that's provided to run the default target and change the various <javac debug="false" to <javac debug="true".
Be careful not to use the clean target, it deletes the src folder!

Comments:

hello, do you know if we can send a event in the other user of Gcalendar with the API of google calendar?

Posted by Simon on mai 04, 2006 at 05:06 PM CEST #

Try this thread

Posted by Alexis MP on mai 07, 2006 at 12:01 PM CEST #

Post a Comment:
Comments are closed for this entry.
About

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« juillet 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today
Blogroll

No bookmarks in folder

News

No bookmarks in folder