In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to use jvm-options, has a certain reference value, interested friends can refer to, I hope you read this article after a great harvest, the following let Xiaobian take you to understand.
First of all, let's explain what jvm-options can do. Simply put, you can pass parameters while the program is running. Similar to the configuration file, but there is no way to configure the configuration file when writing, you can only use this method.
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}'
Note:
-D directly followed by the parameter name;
If there are special characters in the string (such as {}), you can use single quotes or escape each special character with "\"(such as\{\}).
3. Check jvm-options
list-jvm-options
Remove jvm-options
delete-jvm-options --target server -Da='true'
Note:
When parameter values need to be changed, original values must be deleted and reset;
Parameter name and parameter value must be the same as original value when deleting;
When there are multiple parameters with the same name, only one of them can be obtained (forget whether the first or last one is the same).
5. Method to obtain jvm-options parameter in application (some versions need to be restarted to take effect)
public static final String A="a";
public static final String B="b";
1), get String, if the acquisition fails, return null.
String b= System.getProperty(B);
2), get Boolean, get failed to return false.
private boolean a= Boolean.getBoolean(A);
Thank you for reading this article carefully. I hope that the article "How to use jvm-options" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.