Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set catalina opts in tomcat configuration

Tags:

tomcat

Hi i set parameters for tomcat in configuration window on tab java and field java options. I'd like add to configuration to catalina_opts is there a way how to do it??

In that field i have

-Dcatalina.home=d:\apache-tomcat-7.0.23
-Dcatalina.base=d:\apache-tomcat-7.0.23
-Djava.endorsed=d:\apache-tomcat-7.0.23\endorsed
-Djava.io.tmpdir=d:\apache-tomcat-7.0.23\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=d:\apache-tomcat-7.0.23\conf\logging.properties
-XX:MaxPermSize=256m

Edit: 22.06.2012 12:26

I want add this parameters

-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=8777 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Djava.rmi.server.hostname=192.168.1.1

Edit: 22.06.2012 12:51

I put these parameters directly into the field "Java options" and it works, not sure why it didn't work the 1st time.

like image 354
Perlos Avatar asked Jun 22 '12 09:06

Perlos


People also ask

Where is Catalina in Tomcat?

Catalina's Configuration Files. Catalina's default behavior can be directly configured by editing the six configuration files located in Tomcat's "$CATALINA_BASE/conf" directory.

What is the use of Catalina properties in Tomcat?

This properties provides some important class loader paths, security package lists, and some tunable performance properties. Another feature of the catalina. properties file is that we can set custom properties in this file and reference them as variables in Tomcat's server. xml file.


2 Answers

Place the following in catalina.sh (below the documentation)

export CATALINA_OPTS="-Dfoo=foo -Dbar=bar"
like image 69
Bozho Avatar answered Sep 20 '22 08:09

Bozho


If you want to use Tomcat as Windows Service, just ignore editing catalina.bat (also CATALONA_OPTS or JAVA_OPTS). After that you install Tomcat as WS, just use ++JvmOptions="<JvmOptions>"(you should be in tomcat_home/bat directory) e.g.

tomcat8.exe //US/Tomcat_Service ++JvmOptions="-D<option>"
like image 44
B.ant Avatar answered Sep 19 '22 08:09

B.ant