com.izforge.izpack.installer.requirement
Class JDKChecker

java.lang.Object
  extended by com.izforge.izpack.installer.requirement.JDKChecker
All Implemented Interfaces:
RequirementChecker

public class JDKChecker
extends Object
implements RequirementChecker

Verifies that the correct JDK version is available for installation to proceed.

Author:
Tim Anderson

Constructor Summary
JDKChecker(InstallData installData, Prompt prompt)
          Constructs a JDKChecker.
 
Method Summary
 boolean check()
          Determines if the JDK is required, and if so, if it exists.
protected  boolean exists()
          Determines if the JDK is installed, by executing attempting to execute javac.
protected  boolean notFound()
          Invoked when the JDK is not found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDKChecker

public JDKChecker(InstallData installData,
                  Prompt prompt)
Constructs a JDKChecker.

Parameters:
installData - the installation data
prompt - the prompt
Method Detail

check

public boolean check()
Determines if the JDK is required, and if so, if it exists.

Specified by:
check in interface RequirementChecker
Returns:
true if JDK requirements are met, otherwise false

exists

protected boolean exists()
Determines if the JDK is installed, by executing attempting to execute javac.

Returns:
true if javac was successfully executed, otherwise false

notFound

protected boolean notFound()
Invoked when the JDK is not found.

This prompts the user to proceed with the installation or cancel it

Returns:
true if the user proceeds with the installation, false if they cancel it


Copyright © 2018. All rights reserved.