class JavaToolchainImpl extends DefaultToolchain implements JavaToolchain {
    private String javaHome;

    public static final String KEY_JAVAHOME = "jdkHome"; // NOI18N

    JavaToolchainImpl(ToolchainModel model, Logger logger) {
        super(model, "jdk", logger);
    }

    public String getJavaHome() {
        return javaHome;
    }

    public void setJavaHome(String javaHome) {
        this.javaHome = javaHome;
    }

    public String toString() {
        return "JDK[" + getJavaHome() + "]";
    }

    public String findTool(String toolName) {
        Path toRet = findTool(toolName, Paths.get(getJavaHome()).normalize());
        if (toRet != null) {
            return toRet.toAbsolutePath().toString();
        }
        return null;
    }

    private static Path findTool(String toolName, Path installDir) {<FILL_FUNCTION_BODY>}
}

        Path bin = installDir.resolve("bin"); // NOI18N
        if (Files.isDirectory(bin)) {
            if (Os.IS_WINDOWS) {
                Path tool = bin.resolve(toolName + ".exe");
                if (Files.exists(tool)) {
                    return tool;
                }
            }
            Path tool = bin.resolve(toolName);
            if (Files.exists(tool)) {
                return tool;
            }
        }
        return null;
    
<methods>public final void addProvideToken(java.lang.String, org.apache.maven.toolchain.RequirementMatcher) ,public boolean equals(java.lang.Object) ,public final ToolchainModel getModel() ,public final java.lang.String getType() ,public int hashCode() ,public boolean matchesRequirements(Map<java.lang.String,java.lang.String>) ,public java.lang.String toString() <variables>public static final java.lang.String KEY_TYPE,private final non-sealed Logger logger,private ToolchainModel model,private Map<java.lang.String,org.apache.maven.toolchain.RequirementMatcher> provides,private java.lang.String type