1

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!

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, actually I sat down with the problem and yeah, the jar is the way to go, but I forgot 2 things, 1 is to include source code in the jar and 2 is to not use any libraries not usable by GWT (apperently java.text.DateFormat wasn't...). Thanks though. Check this link out for all libs from the JDK: developers.google.com/web-toolkit/doc/1.6/RefJreEmulation

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.