【问题标题】:GWT - Can't Finding entry point classesGWT - 找不到入口点类
【发布时间】:2011-08-25 12:09:34
【问题描述】:

我最近开始开发另一个 GWT 模块。因此,我创建了一个包含所有新类和一个实现新入口点的特定类的包。我在我的 gwt.xml 中修改为我的新入口点。编译时出现以下错误:

 GWT Compiling client-side code.
WARNING: 'com.google.gwt.dev.GWTCompiler' is deprecated and will be removed in a future release.
Use 'com.google.gwt.dev.Compiler' instead.
(To disable this warning, pass -Dgwt.nowarn.legacy.tools as a JVM arg.)
Compiling module com.test.gwt
   Finding entry point classes
      [ERROR] Unable to find type 'com.test.ajax.input.createEntryPoint'
         [ERROR] Hint: Previous compiler errors may have made this type unavailable

这不是大写错误,gwt.xml 中的路径和我的实际包中的路径都写相同...有什么线索吗?

【问题讨论】:

  • GWT 编译器可能没有指向您的任何代码。您是通过 Eclipse 还是其他方式使用 GWT?您知道为什么会收到已弃用的警告吗?你实际上是如何调用编译器的。
  • 我正在使用带有插件 gwt4nb 的 netbeans。不推荐使用的警告一直存在,即使我的代码可以编译并正常工作。我不确定您所说的“调用”是什么意思,但是要启动编译过程,我右键单击我的项目,然后点击构建。尝试清洁,没有改变任何东西。

标签: java javascript gwt jakarta-ee compiler-errors


【解决方案1】:
  1. 确保您的代码在“客户端”子包中
  2. 确保您的 .gwt.xml 文件位于客户端的父包中

例如,将您的目录/包结构更改为:

com/test/ajax/input/client/createEntryPoint.java
com/test/ajax/input/Module.gwt.xml

您的 Module.gwt.xml 应包含以下行:

<entry-point class="com.test.ajax.input.client.createEntryPoint"/>

更多:http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html

【讨论】:

  • 我的代码不在子包客户端中,这就是问题所在。我只是在客户端/输入中重构了所有新代码。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-05-15
  • 1970-01-01
  • 2020-06-02
  • 2015-02-03
  • 2012-12-08
  • 2019-01-09
  • 1970-01-01
相关资源
最近更新 更多