1. 程式人生 > >tomcat中Catalina裡的JAVA_OPTS和CATALINA_OPTS區別

tomcat中Catalina裡的JAVA_OPTS和CATALINA_OPTS區別

tomcat中Catalina裡的JAVA_OPTS和CATALINA_OPTS區別

export JAVA_OPTS="-Dfile.encoding=utf-8"

If you start Tomcat after exporting JAVA_OPTS, it will make sure to use UTF-8 encoding for all file
reads, but this behavior will not be restricted to Tomcat’s Java process only, but to all JVM processes
running on the same machine.

export CATALINA_OPTS=" –Xms256m -Xmx1g -XX:MaxPermSize=256m"

To pass specific JVM arguments to Tomcat only, you can use the CATALINA_OPTS environment
variable. A typical scenario is adding more heap memory to the Tomcat process, without affecting the
memory settings of other Java applications