8078519: Can't run SA tools from a non-images build
authorsla
Fri, 24 Apr 2015 09:07:21 +0200
changeset 30284 909da3c92522
parent 30283 41051ea58839
child 30287 b39d2cec5056
8078519: Can't run SA tools from a non-images build Reviewed-by: mchung, alanb, dsamersoff
hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Thu Apr 23 14:09:59 2015 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Fri Apr 24 09:07:21 2015 +0200
@@ -259,8 +259,7 @@
      saProps = new Properties();
      URL url = null;
      try {
-       url = VM.class.getClassLoader().getResource("sa.properties");
-       saProps.load(new BufferedInputStream(url.openStream()));
+       saProps.load(VM.class.getResourceAsStream("/sa.properties"));
      } catch (Exception e) {
        System.err.println("Unable to load properties  " +
                                   (url == null ? "null" : url.toString()) +