public class JVMSelector
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
JVMSelector.JVMLocation
The interface providing information about a JVM.
|
Modifier and Type | Method and Description |
---|---|
static JVMSelector.JVMLocation |
getJVMLocation(java.io.File javaHome,
java.lang.String minVersion,
java.lang.String maxVersion,
boolean jdkOnly)
Checks if this directory contains a JVM with the specified parameters and returns the location object.
|
static JVMSelector.JVMLocation[] |
getJVMLocations()
Returns JVMs found in standard locations.
|
static JVMSelector.JVMLocation[] |
getJVMLocations(java.lang.String minVersion,
java.lang.String maxVersion,
boolean jdkOnly,
java.io.File[] additionalLocations)
Returns JVMs found in standard locations with the given version requirements.
|
static void |
setPreferredJVM(java.lang.String javaHome)
Set the preferred JRE/JDK for your application.
|
public static JVMSelector.JVMLocation[] getJVMLocations()
public static JVMSelector.JVMLocation[] getJVMLocations(java.lang.String minVersion, java.lang.String maxVersion, boolean jdkOnly, java.io.File[] additionalLocations)
minVersion
- the minimum java versionmaxVersion
- the maximum java versionjdkOnly
- only JDKsadditionalLocations
- additional locations that should be tested for JVMspublic static JVMSelector.JVMLocation getJVMLocation(java.io.File javaHome, java.lang.String minVersion, java.lang.String maxVersion, boolean jdkOnly)
javaHome
- the directory to checkminVersion
- the minimum java versionmaxVersion
- the maximum java versionjdkOnly
- only JDKspublic static void setPreferredJVM(java.lang.String javaHome)
javaHome
- the base directory of the JDK/JRE.