[Java]系统环境列表
2016-12-02 20:48
573 查看
测试代码
// 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
相关文章推荐
- [Java]系统环境列表
- Red Hat 9 系统中Java环境的配置
- 获得系统时间及JAVA运行时环境参数
- 配置JAVA系统的环境变量
- java获取系统环境变量和系统属性
- 用JAVA读取系统的环境变量
- 用java读取各种计算机文件系统的文件列表
- Java获得系统环境变
- 跟老紫竹学Java-图书销售系统-我的订单列表界面orderList.jsp
- 用java读取各种计算机文件系统的文件列表
- XP系统中Java环境变量配置
- JAVA 程序中如何拷贝一个目录下的文件及子目录到另一个目录,如何获取系统环境变量等...
- Java获得系统环境变量
- Java 模拟文件管理系统(仿DOS环境)
- Ubuntu Linux 8.04系统JAVA环境配置方法
- java环境变量中的一个Bug还是系统的问题
- 在linux系统下搭建java开发环境(jdk1.6+tomcat6.0+eclipse3.2+myeclipse5.2)的过程
- Java获得系统环境变量
- ubuntu 环境变量设置java ubuntu 系统清理
- Java获得系统环境变量