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>