I ran into this sort of a problem today. I followed the steps from TONS of 
articles, tutorials, guides, and posts. But none worked!

Here was the final solution after hours of banging my head:

I was using the source path tag wrong in gwt.xml in my external jar:

*WRONG:*
<source path='auto.dto'/>

*RIGHT:*
<source path='auto/dto'/>

None of the other guides covered the possibility of only including a 
sub-dir of your module as translatable code, so I didn't find an example of 
how this path should be formatted. But I should have realized that it was a 
path and not a package name, duh!


On Monday, February 7, 2011 12:09:33 PM UTC-5, Hilco Wijbenga wrote:
>
> On 5 February 2011 21:14, Dallas007 <[email protected] <javascript:>> 
> wrote:
> > Hi,
> > i am new to GWT so need help please. I'm am not able to compile my
> > code due to below error.
> >
> > Here are my project details,
> > I have added a new class Utility.java which is out side of Client
> > package. I have instantiae the Utiltity object inside cliant code and
> > imported the class. So I am not sure how to fix this could you please
> > advise me on this?. How to use my Utility class in side client code?
>
> See 
> http://www.gwtapps.com/doc/html/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.ModuleXml.html
> ,
> specifically the <source> tag.
>
> I would suggest you create a separate module for your utility code.
> The generated JAR should contain:
>
> org/example/utils/Code.java
> org/example/utils/Code.class
> org/example/Utilities.gwt.xml
>
> Where Utilities.gwt.xml has
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE module
>   PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.1//EN"
>   "
> http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/distro-source/core/src/gwt-module.dtd
> "
> >
> <module rename-to="Utilities">
>   <inherits name="com.google.gwt.core.Core"/>
>   <source path="utils"/>
> </module>
>
> Then you can use <inherits name="org.example.Utilities"/> to use your
> utility code in other modules.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to