How to pass VM arguements to run on tomcat server startup?

94 Views Asked by At

In our project , in ide we are providing few vm arguements in ecipse run configurations. But when we are deploying the application, we are trying to provide these arguements. But not sure how to provide through tomcat to run on server startup. Can anybody help us here. Thanks in avdance.

1

There are 1 best solutions below

0
Yserbius On

The proper way to set VM arguments in Tomcat is to create a file in the Tomcat bin directory called "setenv.bat" (or "setenv.sh" if you're in Linux or Mac). In that file, you can set JVM options by setting the JAVA_OPTS variable, like for instance:

set JAVA_OPTS="-Xmx2G -Xms128M -Dvariable=2"

https://docs.oracle.com/cd/E40520_01/integrator.311/integrator_install/src/cli_ldi_server_config.html