I\'m looking for sample Java JMX code to access the values of JMX attributes from another VM.
With JConsole, I have no problem looking at java.lang/Memory/Attributes
This is how you get the MemoryMXBean remotely (to complement @Adamski's answer):
MemoryMXBean memoryMXBeanProxy = JMX.newMXBeanProxy( conn, new ObjectName("java.lang:type=Memory"), MemoryMXBean.class);