In Java, the system. getproperty () parameter is as follows:
Java. Version JavaRuntime Environment versionJava. Vendor JavaRuntime Environment vendorJava. Vendor. url JavaVendor URLJava. Home JavaInstallation DirectoryJava. VM. Specification.
System. getProperty ()-the software in your host suspends an established connection, system. getproperty
I cannot describe my mood at the moment ..
Originally, it was a completed netty5 demo program, and a tcp persistent connection was created
Preface today, we help students in the group use system. getproperty () to obtain the attributes of the current system, such as the Java Virtual Machine version, operating system name, and so on.
System. getproperty () is used to obtain the system
The system. getproperty (string name) method is used to obtain the system attributes. System is a class in the lang package. This class has a lot of practical methods to deal with the system, and is generally a class
Method,. getproperty (string key)
One of the examples in "Java and mode" uses system. getproperty (string key)
System.getProperty("user.dir");
It's strange how he knows that the key is "user. dir ". Baidu has been sticking these keys for a long time. But where to find it? It took
Occasionally, system. getproperty () is used, which is inconvenient to find. Here is the record memo:
Written Test classes:
Public class testsystemproperty { Public static void main (string [] ARGs) { system. out. println ("Java Runtime
I started to study Tomcat source code today.
At the beginning, the init method in the startup class calls the system. getproperty and system. setproperty methods many times.
Later, I found out through online search that this is a method for
1. Package:
Copy codeThe Code is as follows: package beanpackage;
/**
*
* @ Author lucifer
*/
Public class SystemProperties {
Public String getRuntimeEnvironmentVersion (){
Return System. getProperty ("java. version ");
}
Public String
System supports standard input, standard output, and error output streams, access to externally defined attributes and environment variables, and methods for loading files and libraries; there is also a practical method to quickly copy part of the
Java. Version Java Runtime Environment version
Java. Vendor Java Runtime Environment vendor
Java. Vendor. url URL of the Java vendor
Java. Home Java installation directory
Java. VM. Specification. Version Java Virtual Machine standard version
Java.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.