Runtime environment determination program, the local server may be used to automatically switch
the Properties prop = System.getProperties ();
String prop.getProperty OS = ( "The os.name");
System.out.println (os.toLowerCase ());
IF (OS! = null && os.toLowerCase (). the indexOf ( "Linux")> -1) { } the else { }
Judge running system environment
Guess you like
Origin www.cnblogs.com/why5125/p/11715045.html
Recommended
Ranking