public class JavaUtils extends java.lang.Object
Constructor and Description |
---|
JavaUtils() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
findJavaExecutable(java.io.File vmInstallLocation)
Starting in the specified VM install location, attempt to find the 'java'
executable file.
|
static java.io.File |
obtainJavaExecutable()
Use
findJavaExecutable(File) to search in the directory
specified by environment variable JAVA_HOME for the Java
executable. |
static java.lang.String |
obtainJavaExecutionCommand()
Use
obtainJavaExecutable() to determine the Java executable via
environment variable JAVA_HOME . |
public JavaUtils()
public static java.io.File findJavaExecutable(java.io.File vmInstallLocation)
File
object, otherwise return null
.
This is copied from
org.eclipse.jdt.internal.launching.StandardVMType
.public static java.io.File obtainJavaExecutable()
findJavaExecutable(File)
to search in the directory
specified by environment variable JAVA_HOME
for the Java
executable.public static java.lang.String obtainJavaExecutionCommand()
obtainJavaExecutable()
to determine the Java executable via
environment variable JAVA_HOME
. If this fails, a command
that expects the Java executable to be on the path is returned.