【发布时间】:2014-01-29 04:37:09
【问题描述】:
我一直在互联网上,似乎无法得到一个直接的答案,只是想澄清一些事情。
我需要我的网络应用程序从服务器返回一个 ArrayList。 Por 是一个自定义类,它实现了 Serializable 并遵循我能找到的关于 GWT 可序列化的所有规则。
我的 gwt.xml 文件(在 com.pbot 包中)有:
<source path='com.pbot'/>
我所有的自定义类(包括 Por)都在同一个 com.pbot 包中。但我仍然收到“com.pbot.Por 类型没有可用的源代码;您是否忘记继承所需的模块?”信息。我是否需要使用 com.pbot 作为源创建第二个 gwt.xml 并导入它?如果是这样,我该怎么做以及放在哪里?如果没有,我错过了什么?
整个 gwt.xml 代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to='pbot'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='com.pbot.client.Pbot'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<source path='com.pbot'/>
</module>
【问题讨论】:
标签: java xml eclipse gwt package