Search code examples
tomcatstartupwindows-11catalinatomcat10

Tomcat10 is not running on Window11 pro (a window opens and closes upon running startup.bat)


I am trying to run Tomcat10 on my PC having Window's 11 Pro. Upon running startup.bat, a window just opens and closes without showing a running server. All JRE_HOME, JAVA_HOME, CATALINA_HOME, CATALINA_BASE are set correctly.

Upon running "catalina configtest" I have found the following errors:

Using CATALINA_OPTS: "" Unrecognized option: --add-opens=java.base/java.lang=ALL-UNNAMED Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

output on the command prompt after running "catalina configtest"

Now couldn't figure out how to fix this configuration issue to get the server running.

I want to understand the reason for the errors, so I can fix them.


Solution

  • Tomcat10.1 needs Java 11. It does not work with Java 1.8 which I see you are using from the screen cap. See here