Answer the question
In order to leave comments, you need to log in
How to pass Java 9 Options to Tomcat 9?
How to pass in Tomcat 9 Java Options for Java 9+ (such as --add-exports, -add-reads, etc.) if Tomcat is running as a Windows service?
According to the documentation , you can only pass -X and -D options, but how do you pass everything else? If you pass the parameters as is (for example --add-reads), then Tomcat will not start because it does not recognize the parameters.
Adding Java Options to catalina.bat and setenv.bat doesn't work, as those scripts don't seem to be called when Tomcat is started as a service.
Answer the question
In order to leave comments, you need to log in
I asked myself and
I will answer) Despite what is written in the documentation, you can pass options like "--add-reads" with the --JvmOptions9 parameter. But Tomcat does not fully support the Java 9 options format. For example, it understands "--add-opens=java.desktop/java.awt=ALL-UNNAMED" but does not start with "--add-opens java.desktop/java. awt=ALL-UNNAMED" (with a space instead of "=")
Well, in addition, I will write a few points due to which the Tomcat service in Java 9+ under Windows may also not start:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question