diff --git a/core/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java b/core/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java index a2b12ea5e50..599c86097ff 100644 --- a/core/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java +++ b/core/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java @@ -73,7 +73,16 @@ public class JvmInfo implements Streamable, ToXContent { // ignore } info.inputArguments = runtimeMXBean.getInputArguments().toArray(new String[runtimeMXBean.getInputArguments().size()]); - info.bootClassPath = runtimeMXBean.getBootClassPath(); + try { + info.bootClassPath = runtimeMXBean.getBootClassPath(); + } catch (UnsupportedOperationException e) { + // oracle java 9 + info.bootClassPath = System.getProperty("sun.boot.class.path"); + if (info.bootClassPath == null) { + // something else + info.bootClassPath = ""; + } + } info.classPath = runtimeMXBean.getClassPath(); info.systemProperties = runtimeMXBean.getSystemProperties();