I guess this is related to where you defined your feedUrl var...

It is defined ("URL feedUrl = new URL...") inside the try { } block, but you 
use it after the try/catch statement. As a consequence, the feedUrl var is 
no longer visible.

Try with :
URL feedUrl = null;

try {
     feedUrl = new 
URL("http://www.google.com/calendar/feeds/default/allcalendars/full";);
         }
         catch (MalformedURLException e2) {
         }
         CalendarFeed resultFeed = myService.getFeed(feedUrl, 
CalendarFeed.class);

         System.out.println("Your calendars:");
         System.out.println();

         for (int i = 0; i < resultFeed.getEntries().size(); i++) {
             CalendarEntry entry = resultFeed.getEntries().get(i);
             System.out.println("\t" + entry.getTitle().getPlainText());
         }
     }

this way, the feedUrl var is declared (with "null" as default value) before 
the try/catch statement, and thus should remain visible afterwards.

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" 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://code.google.com/apis/calendar/community/forum.html

Reply via email to