org.apache.maven.toolchain.java

## Class DefaultJavaToolChain

- java.lang.Object
- - org.apache.maven.toolchain.DefaultToolchain
  - - org.apache.maven.toolchain.java.DefaultJavaToolChain

- All Implemented Interfaces:
    JavaToolChain, Toolchain, ToolchainPrivate

      public class DefaultJavaToolChain
      extends DefaultToolchain
      implements JavaToolChain

  Author:
    Milos Kleint

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `KEY_JAVAHOME`

    - ### Fields inherited from class org.apache.maven.toolchain.DefaultToolchain

      `KEY_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultJavaToolChain(ToolchainModel model, Logger logger)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `findTool(java.lang.String toolName)` Gets the platform tool executable.
    `java.lang.String` | `getJavaHome()`
    `void` | `setJavaHome(java.lang.String javaHome)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.maven.toolchain.DefaultToolchain

      `addProvideToken, getLog, getModel, getType, matchesRequirements`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.maven.toolchain.Toolchain

      `getType`

- - ### Field Detail

    - #### KEY_JAVAHOME

          public static final java.lang.String KEY_JAVAHOME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DefaultJavaToolChain

          public DefaultJavaToolChain(ToolchainModel model,
                              Logger logger)

  - ### Method Detail

    - #### getJavaHome

          public java.lang.String getJavaHome()

    - #### setJavaHome

          public void setJavaHome(java.lang.String javaHome)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### findTool

          public java.lang.String findTool(java.lang.String toolName)

      Description copied from interface: `Toolchain`
      Gets the platform tool executable.
      Specified by:
        `findTool` in interface `Toolchain`
      Parameters:
        `toolName` - the tool platform independent tool name.
      Returns:
        file representing the tool executable, or null if the tool can not be found