Module java.compiler
Package javax.tools

Class ToolProvider

java.lang.Object
javax.tools.ToolProvider

public classToolProviderextendsObject
Provides methods for locating tool providers, for example, providers of compilers. This class complements the functionality ofServiceLoader.
Since:
1.6
  • Method Details

    • getSystemJavaCompiler

      public static JavaCompiler getSystemJavaCompiler()
      Returns the Java programming language compiler provided with this platform.

      The file manager returned by callinggetStandardFileManager on this compiler supports paths provided by anyfilesystem.

      Implementation Note:
      This implementation returns the compiler provided by thejdk.compiler module if that module is available, andnull otherwise.
      Returns:
      the compiler provided with this platform ornull if no compiler is provided
    • getSystemDocumentationTool

      public static DocumentationTool getSystemDocumentationTool()
      Returns the Java programming language documentation tool provided with this platform.

      The file manager returned by callinggetStandardFileManager on this tool supports paths provided by anyfilesystem.

      Implementation Note:
      This implementation returns the tool provided by thejdk.javadoc module if that module is available, andnull otherwise.
      Returns:
      the documentation tool provided with this platform ornull if no documentation tool is provided
    • getSystemToolClassLoader

      @Deprecated(since="9")public static ClassLoader getSystemToolClassLoader()
      Deprecated.
      This method is subject to removal in a future version of Java SE. Use thesystem tool provider orservice loader mechanisms to locate system tools as well as user-installed tools.
      Returns a class loader that may be used to load system tools, ornull if no such special loader is provided.
      Implementation Requirements:
      This implementation always returnsnull.
      Returns:
      a class loader, ornull