Hi Burento,

I can see a couple of issues.

1) java.net.URL does not exist in the GWT JRE emulation. See
http://code.google.com/webtoolkit/documentation/jre.html  You may only use a
subset of classes in java.lang and java.util for client-side code.

2) You are trying to use a third party library (gdata) from the client-side.
GWT cannot compile against third party Java libraries unless it can see the
source code (which it translates to Javascript) To use GData client
libraries in GWT client code, you'd need to put the source code for these
libraries somewhere, create a GWT Module file for them, and inherit that
module in your Caffeine module.

  However, this is not likely to work, because the GData client libraries
use Java 1.5 language features, and GWT cannot currently compile these. It
is also likely to have dependencies on JRE classes which are not present in
the GWT JRE emulation. Finally, there are cross-domain security issues to
overcome, as a client-side GData library running under GWT, even if you were
able to get it to run, would bump up against browser Same-Origin
restrictions.

I think the easiest route is to write the particular functions which use the
GData client library as an RPC service for GWT. Then you can run them in a
real 1.5 JRE on the server, and make RPC calls to these functions from the
GWT client as n eeded.

-Vivian

On 3/2/07, Burento <[EMAIL PROTECTED]> wrote:
>
>
> Ok, if I can get the environment set up, I'll be so happy.  To
> recreate the files, I simply ran the following commands from my
> "Caffeine" project folder:
> ..\projectCreator -eclipse Caffeine
> ..\applicationCreator -eclipse Caffeine com.google.client.caffeine
>
> I then imported the project to Eclipse.  So, from there, I made 3
> alterations to test things out (I added 2 imports and a URL
> declaration).
>
> <code>
> package com.google.client;
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.user.client.ui.Button;
> import com.google.gwt.user.client.ui.ClickListener;
> import com.google.gwt.user.client.ui.Label;
> import com.google.gwt.user.client.ui.RootPanel;
> import com.google.gwt.user.client.ui.Widget;
> import com.google.gdata.*;
> import java.net.*;
>
> public class caffeine implements EntryPoint {
>
>   public void onModuleLoad() {
>     final Button button = new Button("Click me");
>     final Label label = new Label();
>     URL feedURL = new URL("http://www.google.com";);
>
>     button.addClickListener(new ClickListener() {
>       public void onClick(Widget sender) {
>         if (label.getText().equals(""))
>           label.setText("Hello World!");
>         else
>           label.setText("");
>       }
>     });
>
>     // Assume that the host HTML has elements defined whose
>     // IDs are "slot1", "slot2".  In a real app, you probably would
> not want
>     // to hard-code IDs.  Instead, you could, for example, search for
> all
>     // elements with a particular CSS class and replace them with
> widgets.
>     //
>     RootPanel.get("slot1").add(button);
>     RootPanel.get("slot2").add(label);
>   }
>
> </code>
>
> My caffeine.gwt.xml file looks like this:
>
> <module>
>         <!-- Inherit the core Web Toolkit stuff.                  -->
>         <inherits name='com.google.gwt.user.User'/>
>
>         <!-- Specify the app entry point class.                   -->
>         <entry-point class='com.google.client.caffeine'/>
> </module>
>
>
> Now, if I try to run this code, it produces these results:
> -Starting HTTP on port 8888
> -Analyzing source in module 'com.google.caffeine'
>   --Errors in 'C:\Program Files\Google\gwt-windows-1.3.3\Caffeine\src
> \com\google\client\caffeine.java'
>    ---Line 9: The import com.google.gdata cannot be resolved.
>    ---Line 10: The import java.net cannot be resolved
>    ---Line 17: URL cannot be resolved to a type
>    ---Line 17: URL cannot be resolved to a type
> -Finding entry point classes
>   --Unable to find type 'com.google.client.caffeine'
>    ---Hint: Previous compiler errors may have made this type
> unavailable
>    ---Hint: Check the inheritance chain from your module; it may not
> be inheriting a required module or a module may not be adding its
> source path entries properly
>   --Failure to load module 'com.google.caffeine'
>
> So, my assumption is indeed that something isn't set up properly.  :-\
>
> Also, my jars are located here:
> ~\gwt-windows-1.3.3
> ~\gwt-windows-1.3.3\Caffeine  (*Note:* This is the eclipse project
> folder)
> ~\gwt-windows-1.3.3\gwt-user.jar
> ~\gwt-windows-1.3.3\gdata\java\lib\gdata-calendar-1.0.jar
> ~\gwt-windows-1.3.3\gdata\java\lib\gdata-client-1.0.jar
> ~\gwt-windows-1.3.3\gdata\java\lib\gdata-codesearch-1.0.jar
> ~\gwt-windows-1.3.3\gdata\java\lib\gdata-spreadsheet-1.0.jar
>
> Thanks for the help!  I truly appreciate it.  Once I get this set up,
> I know my application will be pretty cool.  I'm working on making a
> very clean, google-esque application, that integrates many of the
> Google services.
>
> Regards,
> -Brent
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google 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://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to