将 java 升级到 java11 后编译 GWT 时遇到问题

Facing issue compiling GWT after upgrading java to java11

升级后出现以下异常 java。我在我们的项目中使用 gwt 2.9 库和 ant。

[java]    Ignored 37 units with compilation errors in first pass.
     [java] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
     [java]    Resolving com.google.gwt.cell.client.FieldUpdater
     [java]       Found type 'com.google.gwt.cell.client.FieldUpdater'
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]    Resolving com.google.gwt.cell.client.ValueUpdater
     [java]       Found type 'com.google.gwt.cell.client.ValueUpdater'
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]    Resolving com.google.gwt.core.client.AsyncProvider
     [java]       Found type 'com.google.gwt.core.client.AsyncProvider'
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]          [ERROR] Unable to find class java/lang/Object
     [java]          Resolving method get
     [java]             Found type 'com.google.gwt.core.client.Callback'
     [java]                [ERROR] Unable to find class java/lang/Object
     [java]                [ERROR] Unable to find class java/lang/Object
     [java]                [ERROR] Unable to find class java/lang/Object

如果像 java.lang.Object 这样基本的东西对 GWT 编译器不可用,那么听起来 gwt-user 依赖项对编译器不可用。此 jar 库包含 JRE 仿真 类.

当 ant 运行 GWT 编译器时,确保 gwt-user-2.9.0.jar 在类路径上。

最新的 gwt 库 (gwt-user-2.9.0.jar,gwt-dev-2.9.0.jar,gwt-servlet-2.9.0.jar) 依赖于以下 jar。在项目中添加这些 jar 后,问题得到解决。

ant.jar 小马-1.2.0.jar asm-7.1.jar jsinterop-annotations-2.8.2-v20191108.jar base-1.0.0-beta-2.jar tapestry-util-text-4.0.2.jar