Tomcat 9 + Java 10 + Eclipse启动错误

今天把JDK升级到10以后发现Tomcat启动不了,启动提示:

-Djava.endorsed.dirs=D:\develop\apache-tomcat-9.0.7\endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.

原来上面的启动参数已经不支持,启动时删除掉就可以了,配置如图:

Tomcat配置

如果Eclipse启动提示:

Incompatible JVM
Version 1.8.xxxx of the JVM is not suitable for this product. Version: 10 or greater is required.

那么就是你安装的JDK版本过低(path配置),然后你在Eclipse配置eclipse.ini中添加了-Dosgi.requiredJavaVersion=10,这时需要我们添加一下指定JDK位置:

-vm
D:/Program Files/Java/jdk-10/bin/javaw.exe