< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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.
@@ -34,10 +34,12 @@
import java.util.ServiceLoader;
import jdk.internal.vm.compiler.collections.EconomicMap;
import jdk.internal.vm.compiler.collections.MapCursor;
+import jdk.vm.ci.services.Services;
+
/**
* This class contains methods for parsing Graal options and matching them against a set of
* {@link OptionDescriptors}. The {@link OptionDescriptors} are loaded via a {@link ServiceLoader}.
*/
public class OptionsParser {
@@ -49,11 +51,11 @@
*/
public static Iterable<OptionDescriptors> getOptionsLoader() {
if (IS_IN_NATIVE_IMAGE || cachedOptionDescriptors != null) {
return cachedOptionDescriptors;
}
- boolean java8OrEarlier = System.getProperty("java.specification.version").compareTo("1.9") < 0;
+ boolean java8OrEarlier = Services.getSavedProperties().get("java.specification.version").compareTo("1.9") < 0;
ClassLoader loader;
if (java8OrEarlier) {
// On JDK 8, Graal and its extensions are loaded by same class loader.
loader = OptionDescriptors.class.getClassLoader();
} else {
< prev index next >