[Java]系統環境列表

測試代碼

        // TODO Auto-generated method stub
        Map<String, String> envsMap = System.getenv();
        Set<String> keySets = envsMap.keySet();
        for(String key:keySets){
            System.out.println(key+" : "+envsMap.get(key));
        }
        System.out.println("--------------------------");
        Properties properties = System.getProperties();
        Set<Object> keys = properties.keySet();
        for(Object object:keys){
            System.out.println(object+" : "+properties.get(object));
        }

:前是key,後是value

USERPROFILE : C:\Users\David
JAVA_HOME : D:\java\jdk1.8.0_92
#envTSLOGRBCShellExt2668 : 232476752
VS110COMNTOOLS : C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
MOZ_PLUGIN_PATH : D:\Foxit Reader\plugins\
SystemDrive : C:
Path : C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\java\jdk1.8.0_92\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\Doctrine extensions for PHP\;D:\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\TortoiseSVN\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;D:\Sencha\Cmd;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;
PROCESSOR_REVISION : 5e03
USERDOMAIN : LAPTOP-HBIUMHDT
ALLUSERSPROFILE : C:\ProgramData
SESSIONNAME : Console
#envTSLOGSHELLEXT2668 : 232479312
TMP : C:\Users\David\AppData\Local\Temp
#envKKPRbc_Cmdilne : 
LOGONSERVER : \\LAPTOP-HBIUMHDT
CommonProgramFiles : C:\Program Files\Common Files
OnlineServices : Online Services
PROCESSOR_LEVEL : 6
classpath : D:\java\jdk1.8.0_92\jre\lib\rt.jar;.;
USERDOMAIN_ROAMINGPROFILE : LAPTOP-HBIUMHDT
LOCALAPPDATA : C:\Users\David\AppData\Local
COMPUTERNAME : LAPTOP-HBIUMHDT
SystemRoot : C:\WINDOWS
NLS_LANG : AMERICAN_AMERICA.AL32UTF8
USERNAME : David
APPDATA : C:\Users\David\AppData\Roaming
ProgramData : C:\ProgramData
PATHEXT : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
ProgramFiles(x86) : C:\Program Files (x86)
TEMP : C:\Users\David\AppData\Local\Temp
ProgramFiles : C:\Program Files
HOMEDRIVE : C:
platformcode : KV
TNS_ADMIN : D:\PLSQL\PLSQL-11\PLSQL Developer\oracle_client
ProgramW6432 : C:\Program Files
PROCESSOR_IDENTIFIER : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
FPS_BROWSER_USER_PROFILE_STRING : Default
ShellLaunch{A81BA54B-CCFE-4204-8E79-A68C0FDFA5CF} : ShellExt
VS140COMNTOOLS : D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
PROCESSOR_ARCHITECTURE : AMD64
OS : Windows_NT
HOMEPATH : \Users\David
FPS_BROWSER_APP_PROFILE_STRING : Internet Explorer
CommonProgramW6432 : C:\Program Files\Common Files
VS120COMNTOOLS : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
windir : C:\WINDOWS
NUMBER_OF_PROCESSORS : 8
PSModulePath : C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC : C:\Users\Public
CommonProgramFiles(x86) : C:\Program Files (x86)\Common Files
ComSpec : C:\WINDOWS\system32\cmd.exe
RegionCode : APJ
--------------------------
java.runtime.name : Java(TM) SE Runtime Environment
sun.boot.library.path : D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\bin
java.vm.version : 24.45-b08
java.vm.vendor : Oracle Corporation
java.vendor.url : http://java.oracle.com/
path.separator : ;
java.vm.name : Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg : sun.io
user.country : CN
user.script : 
sun.java.launcher : SUN_STANDARD
sun.os.patch.level : 
java.vm.specification.name : Java Virtual Machine Specification
user.dir : E:\Workspaces\MyEclipse 2015\GenerateTable
java.runtime.version : 1.7.0_45-b18
java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs : D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\endorsed
os.arch : amd64
java.io.tmpdir : C:\Users\David\AppData\Local\Temp\
line.separator : 

java.vm.specification.vendor : Oracle Corporation
user.variant : 
os.name : Windows 8
sun.jnu.encoding : GBK
java.library.path : D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\java\jdk1.8.0_92\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\Doctrine extensions for PHP\;D:\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\TortoiseSVN\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;D:\Sencha\Cmd;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;;.
java.specification.name : Java Platform API Specification
java.class.version : 51.0
sun.management.compiler : HotSpot 64-Bit Tiered Compilers
os.version : 6.2
user.home : C:\Users\David
user.timezone : 
java.awt.printerjob : sun.awt.windows.WPrinterJob
file.encoding : GBK
java.specification.version : 1.7
java.class.path : E:\Workspaces\MyEclipse 2015\GenerateTable\bin;E:\Workspaces\MyEclipse 2015\GenerateTable\commons-lang3-3.1.jar
user.name : David
java.vm.specification.version : 1.7
sun.java.command : html.david.table.TestSystemMain
java.home : D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre
sun.arch.data.model : 64
user.language : zh
java.specification.vendor : Oracle Corporation
awt.toolkit : sun.awt.windows.WToolkit
java.vm.info : mixed mode
java.version : 1.7.0_45
java.ext.dirs : D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
sun.boot.class.path : D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\resources.jar;D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\rt.jar;D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\sunrsasign.jar;D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\jsse.jar;D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\jce.jar;D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\charsets.jar;D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\lib\jfr.jar;D:\MyEclipse 2015\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45\jre\classes
java.vendor : Oracle Corporation
file.separator : \
java.vendor.url.bug : http://bugreport.sun.com/bugreport/
sun.io.unicode.encoding : UnicodeLittle
sun.cpu.endian : little
sun.desktop : windows
sun.cpu.isalist : amd64
發佈了167 篇原創文章 · 獲贊 25 · 訪問量 60萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章