问题描述
我想在Eclipse中使用GWT启动一个Web开发项目.为此,我正在关注 http://www.gwtproject.org/上的教程doc/latest/tutorial/create.html
I want to start a Web Development project with GWT in Eclipse. For that I am following the tutorial on http://www.gwtproject.org/doc/latest/tutorial/create.html
创建项目的表单看起来并不像他们解释的那样.例如,我无法在使用Google App Engine"上打勾,因为它不存在.要获取build.xml,我选中了"Generate an Ant Project"字段.
The form to create the Project does not exactly look like they explain. For example I cannot make a checkmark at "Use Google App Engine" since it does not exist. To get the build.xml I checkmarked the "Generate an Ant Project" field.
当我尝试运行生成的代码时,发生以下错误:
When I try to run the generated code, the following error occurs:
Turning off precompile in incremental mode.
Super Dev Mode starting up
workDir: /tmp/gwt-codeserver-9585554490549923267.tmp
2019-02-03 18:36:10.619:INFO::main: Logging initialized @879ms
Loading Java files in com.google.gwt.sample.stockwatcher.StockWatcher.
[ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
当我尝试使用其教程的命令行版本时,出现503错误:
When I try to use the command line version of their tutorial, I get an 503 Error:
HTTP ERROR: 503
Problem accessing /StockWatcher.html. Reason:
Service Unavailable
Powered by Jetty://
我使用GWT SDK 2.8.1和Java 10
I use GWT SDK 2.8.1 and Java 10
我已经为Eclipse安装了许多插件,因此我可以肯定拥有所需的所有插件.也许这与Java版本有关?有人有主意吗?
I installed already lots of plugins for Eclipse, so that I am quite sure to have all plugins I need. Maybe this could be something with the Java version? Does anyone has an idea?
推荐答案
- 检查您的gwt.xml是否确实继承了"com.google.gwt.user.User"
- 检查Java SDK.某些gwt版本仅适用于Java 1.8
- 如果您使用Idea,则存在一个错误,该错误也会导致此错误: https://youtrack.jetbrains.com/issue/IDEA-218731?_ga=2.120118728.1133270638.1599566675-1712334692.1566210515
这篇关于如何解决[错误]提示:检查您的模块是否继承了"com.google.gwt.core.Core"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!