1 /* |
1 /* |
2 * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
56 try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) { |
56 try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) { |
57 Iterable<? extends JavaFileObject> files = |
57 Iterable<? extends JavaFileObject> files = |
58 fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrcDir, self + ".java"))); |
58 fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrcDir, self + ".java"))); |
59 |
59 |
60 Iterable<String> options = Arrays.asList( |
60 Iterable<String> options = Arrays.asList( |
61 "-XaddExports:" |
61 "--add-exports", |
62 + "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED," |
62 "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED," |
63 + "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", |
63 + "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", |
64 "-processorpath", testClassDir, |
64 "--processor-path", testClassDir, |
65 "-processor", self, |
65 "-processor", self, |
66 "-s", ".", |
66 "-s", ".", |
67 "-d", "."); |
67 "-d", "."); |
68 JavacTask task = tool.getTask(out, fm, null, options, null, files); |
68 JavacTask task = tool.getTask(out, fm, null, options, null, files); |
69 |
69 |