Johan S
Johan S

Reputation: 3591

GWT Client External library

I'm working on a GWT project to which I've built a .jar file to handle some processes, it is however reusable in other projects and therefore I want to keep it as a seperate project. But when I want to run the code in GWT (adding the jar to the build-path) I cannot seem to get it right.

I have added, to the root of my external project a "xxx.gwt.xml" file ("xxx" is the name of the file and gwt.xml the extension) and then I've set the source-path (the -tag to "com.xxx" which is the root of all the packages I access in the GWT program. Then I've made it a .jar, added it to the buildpath of the GWT - project and then also added the source-code to the jar, still it finds the "xxx.gwt.xml" file and then it complains about the import of the "com.xxx.yyy.YYY" and that it cannot resolve the type of "YYY".

Also notice that I'm not calling any methods which contains any libs that aren't allowed in GWT and I'm not getting the warning "non-canonical package" which you usually get when GWT doesn't/can't resolve/whatever something is wrong your package in the -tag.

Thanks in advance!

Upvotes: 1

Views: 925

Answers (1)

Riley Lark
Riley Lark

Reputation: 20890

You also have to define a module in your .jar and then inherit it in your external project.

See http://www.vogella.com/articles/GWT/article.html#modules_use

Upvotes: 1

Related Questions