升级到 4.7 后无法在 Eclipse 运行 配置中添加 Java 应用程序

Can't add Java Applications in Eclipse Run Configurations after upgrading to 4.7

我的应用程序 运行 与 Java 9 不正确。为了调试它,我升级到 Eclipse 4.7 (oxygen),因为 Neon 没有 Java 9支持,并应用了 Java 9 支持补丁。

这样做之后,eclipse 无法加载我之前存在的任何 Java 应用程序。认为这可能是版本差异的事情,我删除了它们,尝试重新添加。但是当我点击"New"按钮添加配置时,没有任何反应。

如果我双击 "Java Application,",我会收到以下错误:

An error has occurred. See error log for more details.
tried to access method org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.getTabViewer()Lorg/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer; from class org.eclipse.jdt.internal.debug.ui.launcher.LocalJavaApplicationTabGroup

我可以为其他类型的应用程序(Java Applet、Eclipse 应用程序)添加配置,所以这似乎只是 Java 应用程序的问题。

我也尝试了一个新的工作区,但它有同样的问题。我该如何解决这个问题?

这有点重复,但由于我遇到了这个问题并且看到了其他一些人 post,我将 post 在这里回答我是如何修复它的。

如果你去这里:https://marketplace.eclipse.org/content/java-9-support-beta-oxygen/

您需要按照有关从以 4.7-U-builds 结尾的 link 更新 Eclipse 4.7 的步骤进行操作。当您转到安装新软件和 select Eclipse SDK 时,单击下一步直到您到达安装修复页面,并确保您正在 select 选择第二个选项,如 "update my installation to be compatible with the items being installed" 而不是说 "keep my installation the same and modify the items being installed to be compatible."

的选项

我第一次安装Java 9个更新,我是用后一种方式安装的,运行就遇到了这个问题。现在我已经返回并选择了前者,我可以再次添加 Java 应用程序 运行 配置。

希望对您有所帮助。

Eclipse Oxygen.1a (4.7.1a) Release

2017 年 10 月 11 日更新 - 您应该升级到最新的 eclipse package Eclipse Oxygen.1a (4.7 .1a) 标记为已发布并支持 Java 9.