0

I ve tried to install Tomcat server using binary files in eclipse.When I run cmd and run the startup command, cmd opens and closes and these written on the cmd screen:

>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 also tried but behaves same)

  • When I run this command:

    catalina.bat run


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 version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

>javac -version

javac 15.0.2

  • In the project, JRE setting is like that:

Project -> Properties -> Java Build Path -> Libraries -> JRE System Library -> JavaSE-1.8

  • Eclipse version is :

Eclipse IDE for Java Developers (includes Incubating components)

Version: 2020-12 (4.18.0)

>echo %CATALINA_HOME%

C:\Program Files\Tomcat\apache-tomcat-8.5.69

>echo %JAVA_HOME%

%CATALINA_HOME%\bin exists in Path variable.

C:\Program Files\Java\jdk-15.0.2

Denisa
  • 125
  • 4
  • 16

1 Answers1

2

From catalina.bat source code.

  234 rem Java 9 no longer supports the java.endorsed.dirs
  235 rem system property. Only try to use it if
  236 rem JAVA_ENDORSED_DIRS was explicitly set
  237 rem or CATALINA_HOME/endorsed exists.
  238 set ENDORSED_PROP=ignore.endorsed.dirs
  239 if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar
  240 set ENDORSED_PROP=java.endorsed.dirs
  241 goto doneEndorsed
  242 :noEndorsedVar
  243 if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed
  244 set ENDORSED_PROP=java.endorsed.dirs
  245 :doneEndorsed

Also, from the error message it can be seen that the property was passed on tomcat start command line: -Djava.endorsed.dirs= ... so either JAVA_ENDORSED_DIRS env var exists or CATALINA_HOME/endorsed directory exists.

LMC
  • 10,453
  • 2
  • 27
  • 52
  • 1
    One of the tomcat has endorsed file, and I made changes on settings file. I uninstalled all old versions of Tomcat and install Tomcat 8.5.69 , now [http://localhost:8080](http://localhost:8080) , tomcat web page appears. – Denisa Jul 25 '21 at 21:32
  • You can accept the answer if it helped you :-) – LMC Jul 25 '21 at 21:40