我尝试在eclipse中使用二进制文件安装tomcat server。当我运行cmd并运行startup命令时,cmd会打开和关闭,并在cmd屏幕上写入以下内容:
>startup
Using CATALINA_BASE: "C:\Program Files\Tomcat\apache-tomcat-8.5.69"
Using CATALINA_HOME: "C:\Program Files\Tomcat\apache-tomcat-8.5.69"
Using CATALINA_TMPDIR: "C:\Program Files\Tomcat\apache-tomcat-8.5.69\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk-15.0.2"
Using CLASSPATH: "C:\Program Files\Tomcat\apache-tomcat-8.5.69\bin\bootstrap.jar;C:\Program Files\Tomcat\apache-tomcat-8.5.69\bin\tomcat-juli.jar"
(startup.bat也尝试过,但行为相同)
运行此命令时:
卡塔琳娜·巴特跑
Using CATALINA_BASE: "C:\Program Files\Tomcat\apache-tomcat-8.5.69"
Using CATALINA_HOME: "C:\Program Files\Tomcat\apache-tomcat-8.5.69"
Using CATALINA_TMPDIR: "C:\Program Files\Tomcat\apache-tomcat-8.5.69\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk-15.0.2"
Using CLASSPATH: "C:\Program Files\Tomcat\apache-tomcat-8.5.69\bin\bootstrap.jar;C:\Program Files\Tomcat\apache-tomcat-8.5.69\bin\tomcat-juli.jar"
-Djava.endorsed.dirs=C:\Program Files\Tomcat\apache-tomcat-8.5.69\endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
>java -version
java版本“15.0.2”2021-01-19
java(tm)se运行时环境(构建15.0.2+7-27)
java hotspot(tm)64位服务器虚拟机(构建15.0.2+7-27,混合模式,共享)
>javac -version
JavaC15.0.2
在项目中,jre设置如下:
项目->属性->java构建路径->库->jre系统库->javase-1.8
eclipse版本为:
面向java开发人员的eclipse ide(包括孵化组件)
版本:2020-12(4.18.0)
>echo %CATALINA_HOME%
c:\ProgramFiles\tomcat\apache-tomcat-8.5.69
>echo %JAVA_HOME%
%catalina\u home%\bin存在于路径变量中。
c:\ProgramFiles\java\jdk-15.0.2
1条答案
按热度按时间shyt4zoc1#
来自catalina.bat的源代码。
此外,从错误消息中可以看出,属性是在tomcat启动命令行上传递的:
-Djava.endorsed.dirs= ...
所以JAVA_ENDORSED_DIRS
环境变量存在或不存在CATALINA_HOME/endorsed
目录存在。