GWT - 找不到入口点类

问题描述:

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

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两路,我实际的包都写一样的...任何线索?

+0

GWT编译器可能不会指向您的任何代码。你是通过Eclipse还是其他方式使用GWT?你知道为什么你会得到过时的警告吗?你如何实际调用编译器。 – Pace 2011-05-14 12:59:46

+0

我正在使用netbeans插件gwt4nb。不推荐使用的警告一直存在,即使我的代码可以编译并正常工作。林不知道你的意思是“调用”,但要启动编译过程,我右键单击我的项目,并点击构建。试过清洁,没有改变任何东西。 – guiomie 2011-05-14 13:18:26

  1. 确保您的代码是“客户”子包
  2. 确保您.gwt.xml文件是在客户端的父包

例如目录/包结构改成这样:

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

你Module.gwt.xml应包含follownig行:

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

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

+0

我的代码wasnt在子包客户端,这是什么问题。我只是将客户端/输入中的所有新代码折射出来。 – guiomie 2011-05-14 13:43:54

+1

YEAH!你救了我的一天:) – 2011-11-25 16:36:15