I have been able to successfully extract JMX metrics using jmx prometheus exporter when I add below as a javaagent to my standalone jar using command
-javaagent:.