--- old/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java 2018-10-29 14:02:51.557467424 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java 2018-10-29 14:02:51.197453177 -0700 @@ -59,10 +59,10 @@ "The shared archive file's CompactStrings setting .* does not equal the current CompactStrings setting"; static String appJar; - static String[] globalVmOptions; + static String[] vmOptionsPrefix = {}; public static void main(String[] args) throws Exception { - globalVmOptions = args; // specified by "@run main" in IncompatibleOptions_*.java + vmOptionsPrefix = args; // specified by "@run main" in IncompatibleOptions_*.java appJar = JarBuilder.build("IncompatibleOptions", "HelloString"); // Uncompressed OOPs @@ -118,7 +118,7 @@ System.out.println("Testcase: " + testCaseNr); OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello"), - TestCommon.concat(globalVmOptions, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("SharedStringsBasic.txt"), @@ -145,12 +145,12 @@ // main class param, and fails with "Could not find or load main class" if (!extraOption.isEmpty()) { output = TestCommon.exec(appJar, - TestCommon.concat(globalVmOptions, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", extraOption, "HelloString")); } else { output = TestCommon.exec(appJar, - TestCommon.concat(globalVmOptions, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", "HelloString")); }