Java Gwt编译错误:找不到类型
我在编译我的应用程序时出错:Java Gwt编译错误:找不到类型,java,gwt,maven,Java,Gwt,Maven,我在编译我的应用程序时出错: [INFO] Compiling module com.messagedna.web.Main [INFO] Finding entry point classes [INFO] [ERROR] Unable to find type 'com.messagedna.web.client.controller.Main' [INFO] [ERROR] Hint: Previous compiler errors may have
[INFO] Compiling module com.messagedna.web.Main
[INFO] Finding entry point classes
[INFO] [ERROR] Unable to find type 'com.messagedna.web.client.controller.Main'
[INFO] [ERROR] Hint: Previous compiler errors may have made this type unavailable
[INFO] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
我曾试图在谷歌上找到解决方案,但没有找到任何解决方案。
这是我的gwt.xml文件:
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6//EN"
"http://google-web-toolkit.googlecode.com/svn/releases/1.6/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name='com.extjs.gxt.ui.GXT'/>
<inherits name="com.extjs.gxt.charts.Chart"/>
<entry-point class='com.messagedna.web.client.controller.Main'/>
<source path="com.messagedna"></source>
</module>
在模块标记中添加这一行
您有入口点类,但它没有被编译,因为您有一个编译器或“链接器”错误,这就是为什么在不是入口点的情况下对最后一个案例进行唠叨的原因
[信息][错误]提示:以前的编译器错误可能已导致
此类型不可用[INFO][ERROR]提示:请检查
从您的模块继承链;它可能不是继承一个
必需模块或模块可能未添加其源路径项
恰当地
因此,请检查其他编译器错误或包含JAR的类路径。模块XML文件中的源路径看起来不正确。路径应该指向相对于GWT模块根的包(目录名)。因为您的GWT模块根目录是
com.messagedna.web
,默认源路径是client
,所以您可以从配置中删除源标记。当然我有这个类。所有必要的类都在com.messagedna.web.client包中。我使用IdeaThis源标记必须指向客户端包之外的一个类,但我已经注意到这不是一个好主意,并将该类移动到客户端包,现在有另一个问题:验证新编译的单元[INFO][ERROR]“file:/home/mikhail/bzrrep/DLP/DLPServer/src/main/java/com/messagedna/web/client/util/Config.java”[INFO][ERROR]第8行:导入java.util.concurrent无法解析[INFO][ERROR]第9行:导入java.util.concurrent无法解析
,同样的关于找不到主类。当我删除配置类的所有导入时,所有的东西都会编译,但不会工作。你是在关注这个问题吗??我的答案是:是的,你不能在GWT中使用java.util.concurrent类。你不能在GWT中使用java.util.concurrent
。尝试使用定时器
和延迟命令
机制。看见