Hi Julian,
You'll also need to add the Gears module to your GWT module XML file. This
is probably the step you were missing that led to the hosted mode crash you
observed after trying to run with the gwt-gears JAR on the project and
launch configuration classpath.

Specifically, what you'll need to do is add the following line to your
module XML file:

<inherits name='com.google.gwt.gears.Gears' />

This tells the GWT compiler to look at the Gears.gwt.xml file defined in the
path, and tells it that you are using the Gears module in your application.
This would be the exact same case if you were to split out your own GWT
module into two separate modules, one reusing the other. It is GWT's way to
tell the compiler what it needs to compile, since unlike the standard Java
compiler which just needs JARs on the classpath, the GWT compiler needs
resources that tell it what code it needs to cross-compile to JavaScript
when it tries to compile a GWT module.

Hope that helps,
-Sumit Chandel

On Tue, Aug 18, 2009 at 6:41 AM, philipmac <philipmacmena...@gmail.com>wrote:

>
> right, everything looked like it should be ok, compiled completely
> without warning, but somehow hosted mode only worked with the
> noredist.
>
> I was wondering though why the gears GWT stuff is not distributed as a
> plugin alongside the rest of GWT.  There maybe some technical reason
> for this but it would be nice to have it all as slick as the core
> GWT.
> Or is that just being greedy?
>
> On Aug 18, 3:20 am, Julian Harris <julian.har...@gmail.com> wrote:
> > Thanks Philip!
> >
> > I'll give this a try -- it worked fine in hosted mode I assume.
> >
> > On Tue, Aug 18, 2009 at 3:31 AM, philipmac <philipmacmena...@gmail.com
> >wrote:
> >
> >
> >
> > > Hey, so I've been mucking about with this for say... a couple of
> > > hours.  And, ehh, I never actually used Eclipse until tonight, and I'm
> > > a Perl coder.  So, ahem, take what I say with this in mind...
> > > but, I just right click on my project, go to Properties,
> > > into the Java Build Path, Add External Jars, and stick in the external
> > > jar file into the project.
> >
> > > Although, for some magical reason of which I am unaware of, you have
> > > to use the noredist gears jar.
> >
> > > Give it a try.
> >
> > > On Aug 17, 7:03 pm, Julian <julian.har...@gmail.com> wrote:
> > > > Hi all, firstly the GWT / AppEngine plugin for Eclipse is
> sensational.
> > > > To be able to deploy to production so easily is amazing.
> >
> > > > However a basic question -- how do you add other GWT libraries?
> >
> > > > I wanted to extend the template given by making a geolocation API
> call
> > > > in gwt-gears I'm struggling to figure out where to add gwt-gears.jar.
> >
> > > > 1. I added it to my project's lib folder along with the other jars
> > > > that were included in the default project but they are not presented
> > > > through the GUI as available to add.
> > > > 2. Adding them as 'external jars' solves the IDE syntax checking
> > > > issues but then unsurprisingly crashes in hosted mode.
> >
> > > > I'm missing something basic I'm sure about how to add GWT libraries
> --
> > > > anyone have any suggestions?
> >
> > > > thanks!
> > > > (This is for GALGWT, Eclipse 3.5 / Galileo, and GWT 1.7)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to