Please see description of the problem in the bug report: 
https://bugs.openjdk.java.net/browse/JDK-8078519 
<https://bugs.openjdk.java.net/browse/JDK-8078519>

The simple fix is included below.

Thanks,
/Staffan


diff --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java 
b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
@@ -259,7 +259,12 @@
      saProps = new Properties();
      URL url = null;
      try {
-       url = VM.class.getClassLoader().getResource("sa.properties");
+       if (VM.class.getClassLoader() == null) {
+         url  = ClassLoader.getSystemResource("sa.properties");
+       }
+       else {
+         url = VM.class.getClassLoader().getResource("sa.properties");
+       }
        saProps.load(new BufferedInputStream(url.openStream()));
      } catch (Exception e) {
        System.err.println("Unable to load properties  " +

Reply via email to