Class JREDesc
java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.resource.JREDesc
The java element (or the j2se element) (sub-element of resources) specifies what Java Runtime Environment (JRE)
versions an application is supported on, as well as standard parameters to the Java Virtual Machine.
Several JREs can be specified in the JNLP file, which indicates a prioritized list of the supported JREs,
with the most preferred version first.
- Version:
- $Revision: 1.5 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternstatic final Stringstatic final Stringprivate final Stringinitial heap sizestatic final Stringprivate final URLthe location of a JRE product or nullstatic final Stringprivate final Stringmaximum head sizeargs to pass to the vmstatic final Stringprivate final booleanprivate final List<ResourcesDesc> list of ResourceDesc objectsprivate final Stringstatic final Stringprivate final VersionStringThe platform version or product version according to JSR-56, section 4.6.1 Java Runtime Environment Version Specification if location is not nullstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionJREDesc(VersionString version, String vendor, boolean require32Bit, URL location, String vmArgs, String initialHeapSize, String maximumHeapSize, List<ResourcesDesc> resources) Create a JRE descriptor. -
Method Summary
Modifier and TypeMethodDescription(package private) static StringcheckHeapSize(String heapSize) Check for valid heap size stringbooleanboolean
-
Field Details
-
VERSION_ATTRIBUTE
- See Also:
-
VENDOR_ATTRIBUTE
- See Also:
-
REQUIRE_32_BIT_ATTRIBUTE
- See Also:
-
HREF_ATTRIBUTE
- See Also:
-
JAVA_VM_ARGS_ATTRIBUTE
- See Also:
-
INITIAL_HEAP_SIZE_ATTRIBUTE
- See Also:
-
MAX_HEAP_SIZE_ATTRIBUTE
- See Also:
-
heapPattern
-
version
The platform version or product version according to JSR-56, section 4.6.1 Java Runtime Environment Version Specification if location is not null -
vendor
-
require32Bit
private final boolean require32Bit -
location
the location of a JRE product or null -
initialHeapSize
initial heap size -
maximumHeapSize
maximum head size -
parsedArguments
-
resources
list of ResourceDesc objects
-
-
Constructor Details
-
JREDesc
public JREDesc(VersionString version, String vendor, boolean require32Bit, URL location, String vmArgs, String initialHeapSize, String maximumHeapSize, List<ResourcesDesc> resources) throws ParseException Create a JRE descriptor.- Parameters:
version- the platform version or the product version if location is not nullvendor- the vendorrequire32Bit- the hint whether this application requires a 32-bit JVMlocation- the location of a JRE product or nullvmArgs- arguments to VMinitialHeapSize- initial heap sizemaximumHeapSize- maximum head sizeresources- list of ResourceDesc objects- Throws:
ParseException- is something goes wrong
-
-
Method Details
-
getVersion
- Returns:
- the JRE version. Use isPlatformVersion to determine if this version corresponds to a platform or product version.
-
isPlatformVersion
public boolean isPlatformVersion()- Returns:
- true if the JRE version is a Java platform version (java.specification.version property) or false if it is a product version (java.version property).
-
getVendor
-
getLocation
- Returns:
- the JRE version string.
-
getMaximumHeapSize
- Returns:
- the maximum heap size in bytes.
-
getInitialHeapSize
- Returns:
- the initial heap size in bytes.
-
getResourcesDesc
- Returns:
- the resources defined for this JRE.
-
isRequire32Bit
public boolean isRequire32Bit() -
getAllVmArgs
-
checkHeapSize
Check for valid heap size string- Returns:
- trimmed heapSize if correct
- Throws:
ParseException- if heapSize is invalid
-