Reputation: 2328
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.
Upvotes: 1
Views: 5226
Reputation: 20882
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.
Upvotes: 1