关于Eclipse启动Tomcat时报错Error: Could not create the Java Virtual Machine.

报错界面:

控制台中Console中显示信息:-Djava.endorsed.dirs=D:\Tomcat\apache-tomcat-9.0.80-windows-x64\apache-tomcat-9.0.80\endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.

产生这样的问题主要是当前的JDK版本与Tomcat版本不一致,或者是JRE的路径有问题。在配置Tomcat时,Tomcat的版本我都设置对了,所以直接检查JRE的路径。

Eclipse菜单栏,Window - Preferences。

找到Java - Installed JREs,选中图中标示的路径,点编辑。

点击Directory...选择本地安装的JRE路径,然后点Finish。

我的JRE安装路径D:\JDK\JRESiteHere

点击Apply and Close。

至此,问题解决。

猜你喜欢

转载自blog.csdn.net/Eileennnnnn/article/details/132881357