Java, system settings and environment variables for author: Home cat set an environment variable at run-time debug is true: java -Ddebug = true YourClass set an environment variable in the program debug is true: System.setProperty ( "debug", " True "); Get an environment variable debug: string debug = system.getProperty (" debug "); some of the environment variables are listed in the following table, which is Java already defined, you can pass System.GetProperty in the program. Key ") to get, more environment variables, please refer to the JDK document.
Attribute Name Description Java.Versionjava Runtime Version Java.homejava Installation Directory Java.class.Versionjava class format java.class.pathjava class lookup path java.io.tmpdir Default Temporary directory Java.comPilerjava timely Compiler Java.Ext.dirsjava Extension Directory Os.Name Operating System Name OS.Arch Operating System Architecture Os.Separator file separator (UNIX '/' )Path.separator Path Separator (UNIX ':') line.seParator wrap (UNIX '/n') us.name User account name USER.HOME user directory User.dir user current work catalog