What I have found is the source must be included in the jar file.  the
reason is, the GWT compiler takes the source and compiles it to
javascript.  Thus, if no source then you can not use the external
class.

I found this out by having my own projects in eclipse and then
creating a jar file and it still did not work.

What I did was created the jar file with source (keeping the source
layout) and it works fine at this point.

I am assuming this may be your issue

On Jun 17, 4:12 am, Wohoo <[email protected]> wrote:
> Hi,
>
> I googled a lot in the last 2 days but didn't find any solution for my
> problem.
>
> The problem is, I would like to include some classes from a external
> jar into the gwt project on the client side. The classes which I would
> like to include are enums.
>
> The project structure looks like:
>
> external project:
> - project.enums
>
> gwt project:
> - project.web.client
> - project.web.server
>
> To so i tried to add the source path tag in the project.gwt.xml file.
>
>   <source path="client" />
>   <source path="project.enums" />
>
> but the error is still the same:
>   No source code is available for type project.enums.SexEnum; did you
> forget to inherit a required module?
>
> So I tried to write an own gwt.xml file for the enums. I added the
> enums.gwt.xml in project.enums (in the gwt project), which looks like
> this:
>
> <module>
> <source path="enums" />
> </module>
>
> and added the following lines in the project.gwt.xml:
>
>   <inherits name="project.enums" />
>
> After that the error has changed to this:
>                [ERROR] Line 1: The type java.lang.Object cannot be
> resolved. It is indirectly referenced from required .class files
>                [ERROR] Line 9: The hierarchy of the type SexEnum is
> inconsistent
>
> So, does anyone see why this isn't working? Maybe I don't understand
> the gwt.xml files or maybe it isn't possible to add external classes
> in the gwt project on the client side?
>
> Thanks in advanche
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to