removing java.endorsed.dirs from Tomcat on Eclipse with Java 9 and Java 10

Gar*_*son 5 java eclipse tomcat java-9

I'm using Eclipse 4.7.3a with Tomcat 9.0.4 in the IDE. I upgraded from Java 8 to Java 10. I changed my JAVA_HOME to point to the JDK 10 installation. I went into Eclipse and created a new JDK installed JRE pointing at the Java 10 JDK, and selected it. I rebuilt my project, and tried to start the Tomcat server I had. It said:

-Djava.endorsed.dirs=C:\bin\tomcat\endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
Run Code Online (Sandbox Code Playgroud)

I poked around and found that in the Tomcat launch configuration in Eclipse, under the Arguments tab, there are the following VM arguments:

-Dcatalina.base="I:\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp1" -Dcatalina.home="C:\bin\tomcat" -Dwtp.deploy="I:\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps" -Djava.endorsed.dirs="C:\bin\tomcat\endorsed"
Run Code Online (Sandbox Code Playgroud)

I removed the last part, -Djava.endorsed.dirs="C:\bin\tomcat\endorsed", and hit Apply, but the changes don't "stick"; when I come back to that dialog, the value is still there, and I still can't run Tomcat.

How can I removed the java.endorsed.dirs system property from the Eclipse Tomcat configuration?

Better yet, how can I avoid the problem altogether? Isn't Eclipse and Tomcat ready for Java 9+? Will a newer version of Tomcat 9 fix the problem? Should I remove and add back the Eclipse server? How can I get to the root of the problem?

Ken*_*han 2

我在将WTP插件更新到最新版本(3.9.5)之前和之后也遇到过这个问题,即使在最新的 Eclipse(Oxygen.3a)中也没有包含该插件来解决该问题。