< prev index next >

test/jtreg-ext/requires/VMProps.java

Print this page

        

*** 20,38 **** --- 20,42 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package requires; + import java.io.BufferedInputStream; + import java.io.FileInputStream; import java.io.IOException; + import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import java.util.Properties; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern;
*** 77,86 **** --- 81,91 ---- map.put("vm.cds.custom.loaders", vmCDSForCustomLoaders()); map.put("vm.cds.archived.java.heap", vmCDSForArchivedJavaHeap()); // vm.graal.enabled is true if Graal is used as JIT map.put("vm.graal.enabled", isGraalEnabled()); map.put("docker.support", dockerSupport()); + map.put("release.implementor", implementor()); vmGC(map); // vm.gc.X = true/false vmOptFinalFlags(map); VMProps.dump(map); return map;
*** 419,428 **** --- 424,445 ---- return (p.exitValue() == 0); } + private String implementor() { + try (InputStream in = new BufferedInputStream(new FileInputStream( + System.getProperty("java.home") + "/release"))) { + Properties properties = new Properties(); + properties.load(in); + return properties.getProperty("IMPLEMENTOR").replace("\"", ""); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + /** * Dumps the map to the file if the file name is given as the property. * This functionality could be helpful to know context in the real * execution.
< prev index next >