...
You must configure the service wrapper before using it to start Tomcat.
- Open Tomcat Properties. If you need further details on how to do this, see: Tomcat start/ stop, open properties
- Switch to the Java tab.
Add these lines to Java Options:
Java 8
...
-Djava.awt.headless=true
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-Xloggc:C:\tomcat9\logs\gc.log
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10
-XX:GCLogFileSize=10m |
|
Java 11
Excerpt |
---|
Code Block |
---|
-Djava.awt.headless=true
-Xlog:gc:file=C:\tomcat9\logs\gc.log:time,level,tags:filecount=10,filesize=10m |
|
- Add the required memory sizes to Initial Memory Pool and Maximum Memory Pool; see Tomcat planning for details of estimating Tomcat's memory allocation
- Switch to the General tab to set the Startup Type. If you want to start/stop Tomcat:
- manually, set Manual
- automatically when Windows starts, set Automatic.
Step 3 Run Tomcat under the service account
...