Monitoring ES JVM with jolokia javaagent

Hi,

I want to monitor ES JVM using jolokia java agent.

I have configured below options in /etc/elasticsearch/jvm.options.d/jmx.options

-javaagent:/opt/jolokia/jolokia-agent-jvm-javaagent.jar=port=8081,host=localhost

after restart ES , i get below error & ES won't start.
can anyone suggest a fix for this?

same setup works in my dev environment , which has ES 8.2.2
this doesn't work in prod , which has ES 8.3.2

i also tried setting same option in /etc/sysconfig/elasticsearch , but again it works in Dev , but not on prod.

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.lang.NoClassDefFoundError: com/sun/net/httpserver/Authenticator
at org.jolokia.jvmagent.JvmAgent.premain(JvmAgent.java:75)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
... 3 more
Caused by: java.lang.ClassNotFoundException: com.sun.net.httpserver.Authenticator
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed