GWT: Using External Jar

…衆ロ難τιáo~ 提交于 2019-12-01 09:26:04

问题


I am trying to figure out how to use external jar in GWT project.
I referred http://www.vogella.com/articles/GWTModules/article.html and it worked perfectly.
But the example explained using another project being included in the GWT project's build path instead of including the jar of that project.

I know this should not make a difference but when I created the jar of the external project (including sources) and used it in the client GWT gave me following error:

The import com.person cannot be resolved

What would be the problem?


回答1:


For using external gwt library jar file in your gwt eclipse project you have to add that jar file in library tab from java build path:




回答2:


If you want to use external jar and use that jar classes in your client side. you have to inherit module package entry in client gwt module.gwt.xml

Just example a. com.test.Module2.xml so you have do entry like

<inherits name='com.test.Module2'/>


来源:https://stackoverflow.com/questions/13988653/gwt-using-external-jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!