Apps Classdef not found exception

pedjasmek

Newbie
Hi.I am trying to use google api for interacting with google calendar :
Code:
CalendarService myService = new CalendarService(
				"Moj kalendar");
		try {
			myService.setUserCredentials("maymail@gmail.com", "pass");
			URL postUrl = new URL(
					"https://www.google.com/calendar/feeds/maymail@gmail.com/private/full");
			CalendarEventEntry myEntry = new CalendarEventEntry();
			myEntry.setTitle(new PlainTextConstruct(subject));
			myEntry.setContent(new PlainTextConstruct(
					"Meet for a quick lesson."));

			DateTime startTime = DateTime
					.parseDateTime("2011-02-17T15:00:00-08:00");
			DateTime endTime = DateTime
					.parseDateTime("2011-02-17T17:00:00-08:00");
			When eventTimes = new When();
			eventTimes.setStartTime(startTime);
			eventTimes.setEndTime(endTime);
			myEntry.addTime(eventTimes);

			// Send the request and receive the response:
			CalendarEventEntry insertedEntry = myService.insert(postUrl,
					myEntry);
		} catch (AuthenticationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ServiceException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
I have also included some jar files from gdata from Downloads - gdata-java-client - Project Hosting on Google Code (gdata-client-1.0.jar also) but I am getting classdef not found exception for class com.google.gdata.client.GoogleService.
Any help?Thanks
 
Top