Domanda

I set environment for Apache Tomcat (through setenv.sh)

export JAVA_OPTS="-XX:PermSize=256m -XX:MaxPermSize=356m"

How can I check this params in JSP or Apache Tomcat Manager Page? I want to be sure that options are working correctly.

È stato utile?

Soluzione

You need to get a RuntimeMXBean from the ManagementFactory:

How do I get the commandline that started the process

That will get you the whole command line (except for arguments to the main method). You could also look for JAVA_OPTS environment variable (and also CATALINA_OPTS, which is more useful), but that is an implementation detail: you don't really care about the environment variables... you want to know what options were used to launch the JVM.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top