简体   繁体   English

GWT RPC使用客户端上另一个项目中的类

[英]GWT RPC using classes from another project on client side

My question is similar to my previous one, but this time I included the other project to my main project (I would like to use another project classes on my client side). 我的问题与一个问题类似,但是这次我将另一个项目包括到我的主项目中(我想在客户端使用另一个项目类)。 This is my package hierarchy: 这是我的包层次结构:

包层次结构

The Common.gwt.xml : Common.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name='com.google.gwt.user.User' />
<source path="dal.entities"></source>
</module>

The Main.gwt.xml : Main.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="">
<inherits name="com.google.gwt.user.User"/>
<inherits name="org.rj.shared.Shared"/>
<inherits name="Common" />
<entry-point class="org.rj.client.MainEntryPoint"/>    
</module>

Thank you for any help! 感谢您的任何帮助!

Get a hold of jpa-annotations-source.jar, see comment 14 and add it to your webproject classpath (the one with GWT). 持有jpa-annotations-source.jar, 请参阅注释14 ,并将其添加到您的webproject类路径(带有GWT的类路径)中。 This should allow the GWT compiler to "see" the sources for the imports from your entity classes which I assume is causing problems. 这应该允许GWT编译器“查看”从您认为会引起问题的实体类中导入的源。 Hope it works! 希望它能起作用! ;) ;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM