Package adams.core.management
Class JDeps
- java.lang.Object
-
- adams.core.management.Java
-
- adams.core.management.JDeps
-
public class JDeps extends Java
A helper class for the jdeps utility.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXECUTABLE
the jdeps executable.-
Fields inherited from class adams.core.management.Java
BIN_DIR, CLASSPATH_FULL, CLASSPATH_SHORT, JAVA, JAVAC, MAJOR_VERSION
-
-
Constructor Summary
Constructors Constructor Description JDeps()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
execute(String options)
Executes jdeps and returns the output.static String
execute(String executable, File[] classpath, String options)
Executes the executable and returns the output.static String
execute(String executable, String options)
Executes the executable and returns the output.static String
getDefaultOptions()
Returns the default options ("-histo:live") for jdeps.static String
getExecutablePath()
Returns the full path of the JMap executable, if possible.static boolean
isAvailable()
Checks whether jdeps 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 jdeps executable.- See Also:
- Constant Field Values
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
Checks whether jdeps is available at all.- Returns:
- true if available
-
getExecutablePath
public static String getExecutablePath()
Returns the full path of the JMap executable, if possible.- Returns:
- the full path of the executable if possible, otherwise just the executable
-
getDefaultOptions
public static String getDefaultOptions()
Returns the default options ("-histo:live") for jdeps.- Returns:
- the default options
-
execute
public static String execute(String options)
Executes jdeps and returns the output. Automatically adds classpath to commandline.- Parameters:
options
- additional options for jdeps- Returns:
- the output
-
execute
public static String execute(String executable, String options)
Executes the executable and returns the output. Automatically adds classpath to commandline.- Parameters:
executable
- the jdeps executable to useoptions
- additional options for jdeps- Returns:
- the output
-
execute
public static String execute(String executable, File[] classpath, String options)
Executes the executable and returns the output. Automatically adds classpath to commandline.- Parameters:
executable
- the jdeps executable to useclasspath
- the classpath parts (directories and jar files); uses application classpath if null or 0-lengthoptions
- additional options for jdeps- Returns:
- the output
-
-