Package adams.core.management
Class Keytool
- java.lang.Object
-
- adams.core.management.Java
-
- adams.core.management.Keytool
-
public class Keytool extends Java
A helper class for the keytool utility.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXECUTABLEthe keytool executable.-
Fields inherited from class adams.core.management.Java
BIN_DIR, CLASSPATH_FULL, CLASSPATH_SHORT, JAVA, JAVAC, MAJOR_VERSION
-
-
Constructor Summary
Constructors Constructor Description Keytool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringexecute(String options)Executes keytool and returns the output.static Stringexecute(String executable, String options)Executes the executable and returns the output.static StringgetExecutablePath()Returns the full path of the keytool executable, if possible.static booleanisAvailable()Checks whether keytool is available at all.-
Methods inherited from class adams.core.management.Java
canStopThread, getBinDir, getBinDir, getClassPath, getHome, getJavaExecutable, getMajorVersion, isJDK, isJDK, isJRE, isJRE, main
-
-
-
-
Field Detail
-
EXECUTABLE
public static final String EXECUTABLE
the keytool executable.- See Also:
- Constant Field Values
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
Checks whether keytool is available at all.- Returns:
- true if available
-
getExecutablePath
public static String getExecutablePath()
Returns the full path of the keytool executable, if possible.- Returns:
- the full path of the executable if possible, otherwise just the executable
-
execute
public static String execute(String options)
Executes keytool and returns the output.- Parameters:
options- additional options for keytool- Returns:
- the output
-
-