8078519: Can't run SA tools from a non-images build
Reviewed-by: mchung, alanb, dsamersoff
--- 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()) +