Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started 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"

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