You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GWT Hello World项目编译报错,提示缺少com.google.gwt.core.Core

Troubleshooting GWT 2.8.1 Compile Error: Missing Core Inheritance

Hey there, let's work through this frustrating compile error you're hitting with your GWT Hello World project. Even though you've confirmed your module inherits com.google.gwt.user.User, there are a few common culprits here—especially with your setup using JDK 12 and GWT 2.8.1. Here are the steps to fix this:

1. Fix JDK Version Compatibility (Most Likely Root Cause)

GWT 2.8.1 officially only supports JDK 8; JDK 9 and above introduced module system changes and deprecated APIs that break GWT's older compiler. Even if your module XML looks correct, the JDK version mismatch can trigger misleading error messages like the one you're seeing.

  • Install JDK 8 (make sure it's a full JDK, not just JRE)
  • In Eclipse, right-click your Gwt5 project → Properties
    • Go to Java Build Path → Libraries
    • Remove the JDK 12 entry, then add JDK 8 as your JRE System Library
    • Switch to Java Compiler tab, check "Use compliance from execution environment on the 'Java Build Path'", and select JDK 8 from the dropdown

2. Double-Check Your Module XML File

Even if you didn't modify it, it's worth verifying the exact content of your Gwt5.gwt.xml file to rule out typos or accidental changes. It should look exactly like this:

<module rename-to='gwt5'>
  <!-- Inherit core GWT functionality -->
  <inherits name='com.google.gwt.user.User'/>

  <!-- Define your app's entry point -->
  <entry-point class='com.foo.client.Gwt5'/>

  <!-- Specify source code paths for GWT to compile -->
  <source path='client'/>
  <source path='shared'/>
</module>

Ensure the <inherits> tag is present, spelled correctly, and has no extra spaces or typos.

3. Clean Your Project & Eclipse Cache

Eclipse's cached build files can sometimes cause unexpected issues. Try these steps:

  • Go to Project → Clean, select your Gwt5 project, and click "OK"
  • If that doesn't work, close Eclipse, delete the following from your project directory:
    • .classpath file
    • .project file
    • .settings folder
  • Reopen Eclipse and re-import your project

4. Verify GWT SDK Configuration in Eclipse

Make sure Eclipse is using the correct GWT SDK and there's no conflicting SDK setup:

  • Go to Window → Preferences → Google → Web Toolkit
  • Confirm only GWT 2.8.1 is listed and selected, and the path points to your installed SDK directory
  • Right-click your project → Properties → Google → Web Toolkit, ensure the correct SDK is checked for your project

After trying these steps, re-run the GWT Compile Project command—it should resolve the error.

内容的提问来源于stack exchange,提问作者Clint

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 07:45:39