First, explain what jvm-options can do, and simply say that you can pass parameters while the program is running. Similar to the configuration file, but there is no way to configure the configuration file, you can only use this method.
1. Start Gf,start-domain
2. Create Jvm-options
Create-jvm-options-da= ' true '
create-jvm-options-db= ' abc '
Create-jvm-options-dc= ' 10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3} '
Attention:
-D directly after the parameter name;
If there are special characters in the string, such as {}, you can use single quotation marks, or you can use "\" to escape each special character (such as \{\}).
3. View Jvm-options
List-jvm-options
4. Delete Jvm-options
Delete-jvm-options--target server-da= ' true '
Attention:
When you need to change the parameter value, you must delete the original value and reset it;
The parameter names and values must be the same as the original values when deleting;
When there are multiple identical parameter names, you can only get one of them (forget the first one or the last one).
5. Get the Jvm-options parameter method in the application (some versions need to be restarted to take effect)
public static final String a= "A";
public static final String b= "B";
1), gets the string, or returns NULL if the fetch fails.
String b= System.getproperty (b);
2), gets the Boolean, gets the failure return false.
Private Boolean a= Boolean.getboolean (a);
This article is from the "Night" blog, be sure to keep this source http://icyore.blog.51cto.com/8486958/1690058
"Getting Started with GlassFish" using jvm-options