< prev index next >
test/tools/javac/synthesize/Main.java
Print this page
@@ -90,29 +90,31 @@
void compile(boolean stdBootClassPath, List<String> files) {
File empty = new File("empty");
empty.mkdirs();
+ // files to compile are in a separate directory from test to avoid
+ // confusing jtreg
+ File src = new File(testSrc, "src");
+
List<String> args = new ArrayList<String>();
args.add("-classpath");
args.add("empty");
if (stdBootClassPath) {
- args.add("-Xmodule:java.base");
+ args.add("--patch-module");
+ args.add("java.base=" + testSrc.getAbsolutePath());
} else {
args.add("--system");
args.add("none");
files.add("module-info.java");
}
args.add("-d");
args.add(".");
- // files to compile are in a separate directory from test to avoid
- // confusing jtreg
- File src = new File(testSrc, "src");
for (String f: files)
args.add(new File(src, f).getPath());
System.out.println("Compile: " + args);
StringWriter out = new StringWriter();
< prev index next >