升级到4.7后无法在Eclipse运行配置中添加Java应用程序 [英] Can't add Java Applications in Eclipse Run Configurations after upgrading to 4.7

查看:277
本文介绍了升级到4.7后无法在Eclipse运行配置中添加Java应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序无法在Java 9上正常运行.为了对其进行调试,由于Neon不支持Java 9,因此我升级到Eclipse 4.7(氧气),并应用了Java 9支持补丁.

My application isn't running correctly with Java 9. In order to debug it, I upgraded to Eclipse 4.7 (oxygen) since Neon doesn't have Java 9 support, and applied the Java 9 support patch.

这样做之后,eclipse无法加载我之前存在的任何Java应用程序.考虑到可能是版本差异,我删除了它们,然后尝试重新添加.但是,当我单击新建"按钮添加配置时,什么也没发生.

After doing so, eclipse was failing to load any of my pre-existing Java Applications. Thinking it might be a version difference thing, I deleted them, to try re-adding. But when I click the "New" button to add a configuration, nothing happens.

如果我双击"Java应用程序",则会出现以下错误:

If I double-click "Java Application," I get the following error:

发生错误.有关更多详细信息,请参见错误日志.
尝试访问方法org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.getTabViewer()Lorg/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer;从类org.eclipse.jdt.internal.debug.ui.launcher.LocalJavaApplicationTabGroup

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应用程序的问题.

I am able to add configurations for other types of applications (Java Applet, Eclipse Application) so it seems only to be an issue with Java Applications.

我也尝试了一个新的工作区,但是存在相同的问题.我该如何解决?

I also tried a fresh workspace, but that has the same issue. How can I fix this?

推荐答案

这有点重复,但是由于我遇到了这个问题并且看到了一些其他有关此问题的文章,因此我将就如何解决这个问题发表我的答案在这里.

This is kind of a duplicate but since I experienced the issue and have seen a few others post about it, I'll post my answer of how I fixed it here.

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

您需要按照关于以4.7-U-builds结尾的链接更新Eclipse 4.7的步骤.当您转到安装新软件"并选择Eclipse SDK时,请单击下一步",直到进入安装修补程序"页面,并确保选择第二个选项,例如更新我的安装以使其与要安装的项目兼容".而不是显示保持我的安装不变,并修改要兼容的项目"的选项.

You need to follow the step about updating Eclipse 4.7 from the link that ends in 4.7-U-builds. When you go to Install New Software and select Eclipse SDK, click Next until you get to the Install Remediation Page, and make sure that you are selecting the second option that says something like "update my installation to be compatible with the items being installed" instead of the option that says "keep my installation the same and modify the items being installed to be compatible."

第一次安装Java 9更新时,我采用了后一种方式,但遇到了这个问题.现在,我选择了前者,然后我可以再次添加Java Application Run Configurations.

The first time I installed Java 9 updates, I did it the latter way and ran into this problem. Now that I've gone back and chosen the former, I am able to add Java Application Run Configurations again.

希望这会有所帮助.

这篇关于升级到4.7后无法在Eclipse运行配置中添加Java应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆