public final class CapsuleLauncher extends Object
| Constructor and Description |
|---|
CapsuleLauncher(Path jarFile) |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
enableJMX(List<String> jvmArgs)
Adds an option to the JVM arguments to enable JMX connection
|
static Map<String,List<Path>> |
findJavaHomes()
Returns all known Java installations
|
Capsule |
newCapsule()
Creates a new capsule.
|
Capsule |
newCapsule(Path wrappedJar)
Creates a new capsule
|
Capsule |
newCapsule(String mode)
Creates a new capsule
|
Capsule |
newCapsule(String mode,
Path wrappedJar)
Creates a new capsule
|
CapsuleLauncher |
setCacheDir(Path dir)
Sets the location of the cache directory for the capsules created by
newCapsule |
CapsuleLauncher |
setJavaHomes(Map<String,List<Path>> javaHomes)
Sets the Java homes that will be used by the capsules created by
newCapsule. |
CapsuleLauncher |
setProperties(Properties properties)
Sets the properties for the capsules created by
newCapsule |
CapsuleLauncher |
setProperty(String property,
String value)
Sets a property for the capsules created by
newCapsule |
public CapsuleLauncher(Path jarFile) throws IOException
IOExceptionpublic CapsuleLauncher setJavaHomes(Map<String,List<Path>> javaHomes)
newCapsule.javaHomes - a map from Java version strings to their respective JVM installation pathsthispublic CapsuleLauncher setProperties(Properties properties)
newCapsuleproperties - the propertiesthispublic CapsuleLauncher setProperty(String property, String value)
newCapsuleproperty - the name of the propertyvalue - the property's valuethispublic CapsuleLauncher setCacheDir(Path dir)
newCapsuledir - the cache directorythispublic Capsule newCapsule()
public Capsule newCapsule(String mode)
mode - the capsule modepublic Capsule newCapsule(Path wrappedJar)
wrappedJar - a path to a capsule JAR that will be launched (wrapped) by the empty capsule in jarFile
or null if no wrapped capsule is wantedpublic Capsule newCapsule(String mode, Path wrappedJar)
mode - the capsule mode, or null for the default modewrappedJar - a path to a capsule JAR that will be launched (wrapped) by the empty capsule in jarFile
or null if no wrapped capsule is wantedpublic static Map<String,List<Path>> findJavaHomes()