Eclipse 3.4 GWT 1.6 project - how to reference source from other projects?

前端 未结 8 1910
迷失自我
迷失自我 2020-12-14 02:23

I\'ve got a GWT 1.6 project in Eclipse 3.4 and am trying to reference source from another (non-GWT) project in my workspace. I\'ve added the project to my

8条回答
  •  遥遥无期
    2020-12-14 03:01

    The client-side code in your GWT project (the classes under the client package) can't reference any classes that aren't in a GWT module.

    If you've got code in another project that you want to reference from client code in your GWT project, you need to:

    • Make sure it's all "GWT safe", which means it doesn't reference any JRE classes that aren't emulated by GWT (http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html), or reference any classes that reference JRE classes not emulated
    • Make sure all referenced classes are within a GWT module. This means putting a MyOtherProject.gwt.xml file in your other project, and all the referenced classes must be under a client subpackage
    • Make your GWT project inherit from the other project. So add the following to your GWT project's gwt.xml module file:

提交回复
热议问题