2011-11-03 40 views
0

我正在使用GWT 2.4。我的主要EntryPoint类使用我创建的Serializable类com.myco.clearing.common.xml.XmlNode。如何在我的EntryPoint类正在使用的.gwt.xml模块中正确包含该类?我想包括这在我的.gwt.xml文件...GWT:如何在我的模块文件中正确包含一个类?

<inherits name='com.myco.clearing.common.xml.XmlNode'/> 

但运行我的Web应用程序时出现此错误...

 [ERROR] Unable to find 'com/myco/clearing/common/xml/XmlNode.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? 

任何方式正确包括这一类,而不需要改变它的包名? - 戴夫

回答

2

,你需要对你的classpath中gwt.xml文件以及源代码(java文件,GWT处理Java代码不是类文件)

的interits标记指向你的GWT .xml文件不适用于任何类。

里面的.gwt.xml文件,你可以声明哪些包GWT其“类路径”应该看到:

<module> 
<source path="xml"/> 

</module> 

的XmlNode可以只使用与GWT兼容的类(例如没有文件或套接字)

相关问题