55 * {@linkplain java.nio.file.FileSystem filesystem}.</p> |
55 * {@linkplain java.nio.file.FileSystem filesystem}.</p> |
56 * @return the compiler provided with this platform or |
56 * @return the compiler provided with this platform or |
57 * {@code null} if no compiler is provided |
57 * {@code null} if no compiler is provided |
58 * @implNote This implementation returns the compiler provided |
58 * @implNote This implementation returns the compiler provided |
59 * by the {@code jdk.compiler} module if that module is available, |
59 * by the {@code jdk.compiler} module if that module is available, |
60 * and null otherwise. |
60 * and {@code null} otherwise. |
61 */ |
61 */ |
62 public static JavaCompiler getSystemJavaCompiler() { |
62 public static JavaCompiler getSystemJavaCompiler() { |
63 return getSystemTool(JavaCompiler.class, |
63 return getSystemTool(JavaCompiler.class, |
64 systemJavaCompilerModule, systemJavaCompilerName); |
64 systemJavaCompilerModule, systemJavaCompilerName); |
65 } |
65 } |
76 * {@linkplain java.nio.file.FileSystem filesystem}.</p> |
76 * {@linkplain java.nio.file.FileSystem filesystem}.</p> |
77 * @return the documentation tool provided with this platform or |
77 * @return the documentation tool provided with this platform or |
78 * {@code null} if no documentation tool is provided |
78 * {@code null} if no documentation tool is provided |
79 * @implNote This implementation returns the tool provided |
79 * @implNote This implementation returns the tool provided |
80 * by the {@code jdk.javadoc} module if that module is available, |
80 * by the {@code jdk.javadoc} module if that module is available, |
81 * and null otherwise. |
81 * and {@code null} otherwise. |
82 */ |
82 */ |
83 public static DocumentationTool getSystemDocumentationTool() { |
83 public static DocumentationTool getSystemDocumentationTool() { |
84 return getSystemTool(DocumentationTool.class, |
84 return getSystemTool(DocumentationTool.class, |
85 systemDocumentationToolModule, systemDocumentationToolName); |
85 systemDocumentationToolModule, systemDocumentationToolName); |
86 } |
86 } |
87 |
87 |
88 /** |
88 /** |
89 * Returns the class loader for tools provided with this platform. |
89 * Returns a class loader that may be used to load system tools, |
90 * This does not include user-installed tools. Use the |
90 * or {@code null} if no such special loader is provided. |
91 * {@linkplain java.util.ServiceLoader service provider mechanism} |
91 * @implSpec This implementation always returns {@code null}. |
92 * for locating user installed tools. |
92 * @deprecated This method is subject to removal in a future version of |
93 * |
93 * Java SE. |
94 * @return the class loader for tools provided with this platform |
94 * Use the {@link java.util.spi.ToolProvider system tool provider} or |
95 * or {@code null} if no tools are provided |
95 * {@link java.util.ServiceLoader service loader} mechanisms to |
|
96 * locate system tools as well as user-installed tools. |
|
97 * @return a class loader, or {@code null} |
96 */ |
98 */ |
|
99 @Deprecated |
97 public static ClassLoader getSystemToolClassLoader() { |
100 public static ClassLoader getSystemToolClassLoader() { |
98 return ClassLoader.getSystemClassLoader(); |
101 return null; |
99 } |
102 } |
100 |
103 |
101 private static final boolean useLegacy; |
104 private static final boolean useLegacy; |
102 |
105 |
103 static { |
106 static { |