javascript GWT - 无法找到入口点类

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6001915/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 19:06:25  来源:igfitidea点击:

GWT - Can't Finding entry point classes

javajavascriptgwtjakarta-eecompiler-errors

提问by guiomie

I have recently started developing another GWT module. So I created a package with all my new classes and one specific class that implements a new entrypoint. I modified in my gwt.xml to my new entrypoint. When I compile, I get the following error:

我最近开始开发另一个 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

This isnt a capital letter mistake, both path in gwt.xml and my actual package are written the same... Any clues?

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

回答by mabn

  1. make sure your code is in 'client' subpackage
  2. make sure your .gwt.xml file is in client's parent package
  1. 确保您的代码在“客户端”子包中
  2. 确保您的 .gwt.xml 文件在客户端的父包中

for example change your directory/package structure to this:

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

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

Your Module.gwt.xml should contain the follownig line:

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

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

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

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