public class VMOption extends Object
origin.  Each VM option has a default value. A VM option can be set at VM creation time typically as a command line argument to the launcher or an argument passed to the VM created using the JNI invocation interface. In addition, a VM option may be set via an environment variable or a configuration file. A VM option can also be set dynamically via a management interface after the VM was started. A VMOption contains the value of a VM option and the origin of that value at the time this VMOption object was constructed. The value of the VM option may be changed after the VMOption object was constructed,
| Modifier and Type | Class | Description | 
|---|---|---|
| static enum  | VMOption.Origin | Origin of the value of a VM option. | 
| Constructor | Description | 
|---|---|
| VMOption | Constructs a  VMOption. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static VMOption | from | Returns a  VMOptionobject represented by the givenCompositeData. | 
| String | getName() | Returns the name of this VM option. | 
| VMOption.Origin | getOrigin() | Returns the origin of the value of this VM option. | 
| String | getValue() | Returns the value of this VM option at the time when this  VMOptionwas created. | 
| boolean | isWriteable() | Tests if this VM option is writeable. | 
public VMOption(String name, String value, boolean writeable, VMOption.Origin origin)
VMOption.name - Name of a VM option.value - Value of a VM option.writeable - true if a VM option can be set dynamically, or false otherwise.origin - where the value of a VM option came from.NullPointerException - if the name or value is null
public String getName()
public String getValue()
VMOption was created. The value could have been changed.VMOption was created.public VMOption.Origin getOrigin()
public boolean isWriteable()
HotSpotDiagnosticMXBean.setVMOption method.true if this VM option is writeable; false otherwise.public static VMOption from(CompositeData cd)
VMOption object represented by the given CompositeData. The given CompositeData must contain the following attributes: 
Attribute Name Type name java.lang.Stringvalue java.lang.Stringorigin java.lang.Stringwriteable java.lang.Boolean
cd - CompositeData representing a VMOption
VMOption object represented by cd if cd is not null; null otherwise.IllegalArgumentException - if cd does not represent a VMOption with the attributes described above.
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/jdk.management/com/sun/management/VMOption.html