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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
mainmethod). You could also look forJAVA_OPTSenvironment variable (and alsoCATALINA_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.