mac eclipse中運行tomcat出現錯誤:-Djava.endorsed.dirs=D:\Tomcat 9.0\endorsed is not supported


-Djava.endorsed.dirs=D:\Tomcat 9.0\endorsed is not supported. Endorsed standards and standalone APIs

in modular form will be supported via the concept of upgradeable modules. 

啟動tomcat時出現這個問題,都說這是由於jdk版本過高引起的(本人使用的是tomcat9.0 jdk 10.0.1)

參考辦法1:

在Eclipse的Run -> Run Configurations的界面里 有一個設置參數里Arguments頁面里的VM arguments的參數里面把最后的有-Djava.endorsed.dirs="D:\java\tomcat\apache-tomcat-9.0.10\endorsed"的參數刪除,然后點擊Apply,再點Run就行了。(不過我的出現一個問題,就是每次運行之后都要刪除,因為這些個數據會自動還原到VM arguments中,也是很讓人頭疼的。)

解決辦法2:

創建server時,選用tomcat9.0, 對應的JRE選為 jdk1.8.0的版本,問題終於解決。

 

如圖,JRE選 10.0.1的版本就會出現這樣的問題,選1.8.0_162的版本就OK了!!!

參考tomcat與jdk版本的適配:

tomcat v7.0-------support-------->Java EE 5 and 6

tomcat v8.0-------support-------->Java EE 5,6 and 7

tomcat v8.5-------support-------->Java EE 5,6 and 7

tomcat v9.0-------support-------->Java EE 5,6,7 and 8

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM