0

I am running into some issues with one particular project's run configuration. I have updated Eclipse Oxygen to use Java 9 and was able to clear up any compiler errors. When I go to run/debug, an error occurs and this is what's in the log:

!ENTRY org.eclipse.core.jobs 4 2 2017-09-29 13:51:28.520
!MESSAGE An internal error occurred during: "Launching (My Run Config Name)".
!STACK 0
java.lang.NullPointerException
  at org.eclipse.jdt.launching.JavaRuntime.computeUnresolvedRuntimeDependencies(JavaRuntime.java:954)
  at org.eclipse.jdt.launching.StandardClasspathProvider.computeUnresolvedClasspath(StandardClasspathProvider.java:53)
  at org.eclipse.jdt.launching.JavaRuntime.computeUnresolvedRuntimeClasspath(JavaRuntime.java:1502)
  at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.getBootpathExt(AbstractJavaLaunchConfigurationDelegate.java:299)
  at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.getVMSpecificAttributesMap(AbstractJavaLaunchConfigurationDelegate.java:615)
  at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:71)
  at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
  at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
  at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
  at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

I get the same error in the log just by going to Run Configurations and viewing this configuration too, and the configuration is not editable because of this.

I don't see the issue with my other configuration but that project is much smaller and less complex. However they both work if I roll back to my 1.7 JDK.

I'm still just using a .classpath file and haven't started messing around with module-info files yet, not sure if that could be a problem. This is what the .classpath entry for JRE_CONTAINER looks like (but it looks the same on the other working project so not sure if there's anything wrong. The only module I added was java.xml.ws):

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
    <attributes>
        <attribute name="module" value="true"/>
        <attribute name="limit-modules" value="java.se,javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web,jdk.accessibility,jdk.attach,jdk.compiler,jdk.httpserver,jdk.jartool,jdk.javadoc,jdk.jconsole,jdk.jdi,jdk.management,jdk.packager,jdk.plugin.dom,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,oracle.desktop,oracle.net,jdk.dynalink,jdk.incubator.httpclient,jdk.jfr,jdk.jshell,jdk.jsobject,jdk.management.cmm,jdk.management.jfr,jdk.management.resource,jdk.net,jdk.packager.services,jdk.scripting.nashorn,jdk.xml.dom,java.xml.ws"/>
    </attributes>
</classpathentry>
yshavit
  • 42,327
  • 7
  • 87
  • 124
  • 1
    Did you update the ini file? https://stackoverflow.com/questions/46369792/why-wont-eclipse-oxygen-start-for-the-first-time/46370112#46370112 – jwils Sep 29 '17 at 19:20
  • Yes, I updated the ini file it doesn't seem to have any effect on this issue. – Scott Molling Sep 29 '17 at 19:38
  • See [Eclipse bug 525353](https://bugs.eclipse.org/bugs/show_bug.cgi?id=525353). What is your `eclipse.buildId`? – howlger Sep 29 '17 at 20:26
  • My buildId is 4.7.1.U20170927-0115, same as what is listed in that Eclipse bug, so looks like this is an issue others are having and I will have to monitor it there (or wait for the stable release in mid-October). – Scott Molling Oct 02 '17 at 13:13
  • Did you get a chance to try it with the latest release? Can upgrade to the latest [eclipse package](https://www.eclipse.org/downloads/eclipse-packages/) Eclipse Oxygen.1a (4.7.1a) which supports Java 9. – Naman Oct 12 '17 at 03:40
  • I did try it and the exception is gone, so this issue was fixed by Eclipse for the latest release. – Scott Molling Oct 12 '17 at 13:16

1 Answers1

0

The solution is to upgrade to the newly released Eclipse package Oxygen.1a (4.7.1a) which supports Java 9.