Sample setenv.bat file for Tomcat and VisualVM

30 Jul 2020

This can be used on Windows to allow VisualVM to connect to a running Tomcat instance:

1
2
3
4
set JAVA_OPTS=-Dcom.sun.management.jmxremote ^  
  -Dcom.sun.management.jmxremote.port=9090 ^  
  -Dcom.sun.management.jmxremote.ssl=false ^  
  -Dcom.sun.management.jmxremote.authenticate=false