1

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.

indapublic
  • 2,208
  • 9
  • 38
  • 49

1 Answers1

1

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.

Community
  • 1
  • 1
Christopher Schultz
  • 20,221
  • 9
  • 60
  • 77