Can't add Java Applications in Eclipse Run Con

2019-04-07 13:30发布

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.

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.

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

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

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?

2条回答
beautiful°
2楼-- · 2019-04-07 14:07

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.

If you go here: https://marketplace.eclipse.org/content/java-9-support-beta-oxygen/

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."

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.

Hope this helps.

查看更多
欢心
3楼-- · 2019-04-07 14:14

Eclipse Oxygen.1a (4.7.1a) Release

Update as of 11 October,2017 - You shall upgrade to the latest eclipse package Eclipse Oxygen.1a (4.7.1a) which is marked as released and supports Java 9.

查看更多
登录 后发表回答