Enabling JMX for Pivotal Platform Java apps

Set a flag to turn JMX on in the application

cf set-env rspusage JBP_CONFIG_JMX "{enabled: true}"

Restage the application

cf restage rspusage

Create a tunnel from the local machine to the app instance:

cf ssh -N -T -L 5000:localhost:5000 rspusage

Connect to the local port using jvisualVM (localhost:5000)