What is JMX (Java Management Extensions) and how is it used in JVM monitoring?
JMX allows the JVM to expose internal information like memory usage and garbage collection statistics to external tools, but itâ€™s mainly used for application logging.
Thatâ€™s partially correct. JMX is indeed used to expose JVM metrics, but it is not primarily focused on application logging.
Can you explain how JMX can be used to monitor garbage collection and heap memory usage in a running JVM?