Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Step by Step Guide to enable JMX in tomcat in windows

To enable JMX (Java Management Extensions) in Apache Tomcat on a Windows system, you can follow these step-by-step instructions:

  1. Open the Tomcat installation directory in Windows Explorer.
  2. Navigate to the bin directory.
  3. Locate the catalina.bat file and open it in a text editor.
  4. Search for the set JAVA_OPTS line in the catalina.bat file. It may look like this:bashCopy codeset JAVA_OPTS=%JAVA_OPTS% <some_other_options>
  5. Add the following options to the JAVA_OPTS line to enable JMX:bashCopy codeset JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote ^ -Dcom.sun.management.jmxremote.port=9999 ^ -Dcom.sun.management.jmxremote.ssl=false ^ -Dcom.sun.management.jmxremote.authenticate=false The above configuration sets JMX to listen on port 9999, disables SSL, and disables authentication. Adjust these values as needed for your specific setup. Note the ^ symbol at the end of each line, which indicates a line continuation in the Windows batch file.
  6. Save the changes to the catalina.bat file.
  7. Open a command prompt as an administrator.
  8. Navigate to the bin directory within the Tomcat installation directory.
  9. Execute the following command to start Tomcat:bashCopy codecatalina.bat run
  10. Tomcat will start with JMX enabled on the specified port. You should see log messages indicating the JMX configuration.

Sample

set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9012 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x