Eclipse和GWT在错误的包中寻找继承的模块,尽管gwt.xml文件有正确的路径?

时间:2014-01-08 15:59:30

标签: java xml eclipse gwt package

尝试运行我的Google Web应用程序时,我一直在使用GWT在Eclipse中工作,它给了我这个错误:

“加载模块    com.example.pbot.Pbot       加载继承的模块'com.example.pbot.Pbot'          [错误]无法在类路径中找到'com / example / pbot / Pbot.gwt.xml';可能是一个错字,或者你忘了为源包含一个类路径条目? [错误] shell在doStartup方法中失败“

我的所有软件包都是com.pbot,com.pbot.client,com.pbot.server等;我不知道它在哪里看到com.example。

gwt.xml文件中的入口点类是com.pbot.client.Pbot,这是我的入口点类。这是完整的gwt.xml:

-->
<!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'/>

</module>

我已经清理,刷新并重新启动了项目,我不知道还能做什么。在哪里读“com.example?”请帮忙!

2 个答案:

答案 0 :(得分:6)

检查运行配置 - &gt;参数。将引用com.example.pbot.Pbot

我想,这就是托马斯提到的。

enter image description here

答案 1 :(得分:2)

检查项目属性,在GWT页面中,它可能引用了您最初创建的com.example