在GWT中添加外部jar
我有一个打包了源代码的jar文件 我在war/WEB-INF/lib/xxx.jar Add to build路径中插入了jar 但是当我运行这个项目时,我犯了一个错误 编辑添加了gwt.xml在GWT中添加外部jar,gwt,Gwt,我有一个打包了源代码的jar文件 我在war/WEB-INF/lib/xxx.jar Add to build路径中插入了jar 但是当我运行这个项目时,我犯了一个错误 编辑添加了gwt.xml <module rename-to='bookmanagementsystem'> <inherits name='com.google.gwt.user.User'/> <inherits name='com.google.gwt.user.theme.st
<module rename-to='bookmanagementsystem'>
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name='com.example.Book'></inherits>
<entry-point class='com.example.Book.client.Index'/>
</module>
如果您想将外部jar包括到GWT中,那么请确保您执行了以下操作
<inherits name='sample.Source'/>
例如:
jar文件中的Sorce.gwt.xml
<module>
<source path="">
<include name="**/MyEntity.java"/>
</source>
</module>
供参考:http://jonathan.lalou.free.fr/?p=1077
GWT不支持客户端的序列化,所以请尝试使用RPC并从服务器中的jar使用这些类,或者您只需复制jar的包并添加到GWT项目的src
或
我解决了jar文件必须包含java源代码和类文件的问题,或者将java源代码打包到jar中并使用。您是否也可以发布.gwt.xml文件代码?您是否确定com.example中有Book.gwt.xml文件?请告诉jar文件的包。检查:)@Parvathy我试过jar,java源代码和类文件仍然是一样的problem@Parvathy现在我遇到了一个错误“没有可用于com.example.module.model.Person类型的源代码;您是否忘记继承所需的模块?[错误]找不到类型“com.yal.BMS.client.Index”@Bucks您是否在.gwt.xml文件中继承了此(com.example.module.model.Person)模块?我的意思是,这个包中有一个.gwt.xml文件,您必须在当前项目的gwt.xml中继承它。我的意思是,如果这个模块不是gwt项目,那么在com.example中创建module.gwt.xml文件,它必须具有以下内容
<module>
<source path="">
<include name="**/MyEntity.java"/>
</source>
</module>