GWT Error: There is '1' error in 'gwt-module.dtd'

GWT Error: There is '1' error in 'gwt-module.dtd'

我正在学习 GWT 并且正在尝试 运行 这个 tutorial by Vogella

在 Windows 10 和 JDK 11

上使用 Eclipse GWT 插件 3.0

我在第一行收到这个错误 Error: There is '1' error in 'gwt-module.dtd'.

/de.vogella.gwt.helloworld/src/de/vogella/gwt/helloworld/De_vogella_gwt_helloworld.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
  When updating your version of GWT, you should also update this DTD reference,
  so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.1//EN"
  "http://gwtproject.org/doctype/2.8.1/gwt-module.dtd">
<module rename-to='de_vogella_gwt_helloworld'>
  <!-- Inherit the core Web Toolkit stuff.                        -->
  <inherits name='com.google.gwt.user.User'/>

  <!-- Inherit the default GWT style sheet.  You can change       -->
  <!-- the theme of your GWT application by uncommenting          -->
  <!-- any one of the following lines.                            -->
  <inherits name='com.google.gwt.user.theme.clean.Clean'/>
  <!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->

  <!-- Other module inherits                                      -->

  <!-- Specify the app entry point class.                         -->
  <entry-point class='de.vogella.gwt.helloworld.client.De_vogella_gwt_helloworld'/>

  <!-- Specify the paths for translatable code                    -->
  <source path='client'/>
  <source path='shared'/>

  <!-- allow Super Dev Mode -->
  <add-linker name="xsiframe"/>
</module>

我在 GWT 官方教程中也遇到了同样的错误 http://www.gwtproject.org/doc/latest/tutorial/index.html

由此post发现生成的dtd是错误的

"http://gwtproject.org/doctype/2.8.1/gwt-module.dtd"

我更正为

"http://www.gwtproject.org/doctype/2.8.1/gwt-module.dtd"

错误消失了!