< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Versions.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -30,15 +30,17 @@
 import java.nio.file.Path;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
+import jdk.vm.ci.services.Services;
+
 /** Avoid using directly. Only public for the needs of unit testing. */
 public final class Versions {
     static final Versions VERSIONS;
     static {
-        String home = System.getProperty("java.home");
+        String home = Services.getSavedProperties().get("java.home");
         VERSIONS = new Versions(home == null ? null : new File(home).toPath());
     }
 
     private final Map<Object, Object> versions;
 
< prev index next >