java.version Java Runtime Environment version
java.vendor Java Runtime Environment vendor
java.vendor.url Java vendor URL
java.home Java installation directory
java.vm.specification.version Java Virtual Machine specification version
java.vm.specification.vendor Java Virtual Machine specification vendor
java.vm.specification.name Java Virtual Machine specification name
java.vm.version Java Virtual Machine implementation version
java.vm.vendor Java Virtual Machine implementation vendor
java.vm.name Java Virtual Machine implementation name
java.specification.version Java Runtime Environment specification version
java.specification.vendor Java Runtime Environment specification vendor
java.specification.name Java Runtime Environment specification name
java.class.version Java class format version number
java.class.path Java class path
java.library.path List of paths to search when loading libraries
java.io.tmpdir Default temp file path
java.compiler Name of JIT compiler to use
java.ext.dirs Path of extension directory or directories
os.name Operating system name
os.arch Operating system architecture
os.version Operating system version
file.separator File separator ("/" on UNIX)
path.separator Path separator (":" on UNIX)
line.separator Line separator ("\n" on UNIX)
user.name User's account name
user.home User's home directory
user.dir User's current working directory
Properties props=System.getProperties(); //系統屬性
System.out.println("Java的運行環境版本:"+props.getProperty("java.version"));
System.out.println("Java的運行環境供應商:"+props.getProperty("java.vendor"));
System.out.println("Java供應商的URL:"+props.getProperty("java.vendor.url"));
System.out.println("Java的安裝路徑:"+props.getProperty("java.home"));
System.out.println("Java的虛擬機規范版本:"+props.getProperty("java.vm.specification.version"));
System.out.println("Java的虛擬機規范供應商:"+props.getProperty("java.vm.specification.vendor"));
System.out.println("Java的虛擬機規范名稱:"+props.getProperty("java.vm.specification.name"));
System.out.println("Java的虛擬機實現版本:"+props.getProperty("java.vm.version"));
System.out.println("Java的虛擬機實現供應商:"+props.getProperty("java.vm.vendor"));
System.out.println("Java的虛擬機實現名稱:"+props.getProperty("java.vm.name"));
System.out.println("Java運行時環境規范版本:"+props.getProperty("java.specification.version"));
System.out.println("Java運行時環境規范供應商:"+props.getProperty("java.specification.vender"));
System.out.println("Java運行時環境規范名稱:"+props.getProperty("java.specification.name"));
System.out.println("Java的類格式版本號:"+props.getProperty("java.class.version"));
System.out.println("Java的類路徑:"+props.getProperty("java.class.path"));
System.out.println("加載庫時搜索的路徑列表:"+props.getProperty("java.library.path"));
System.out.println("默認的臨時文件路徑:"+props.getProperty("java.io.tmpdir"));
System.out.println("一個或多個擴展目錄的路徑:"+props.getProperty("java.ext.dirs"));
System.out.println("操作系統的名稱:"+props.getProperty("os.name"));
System.out.println("操作系統的構架:"+props.getProperty("os.arch"));
System.out.println("操作系統的版本:"+props.getProperty("os.version"));
System.out.println("文件分隔符:"+props.getProperty("file.separator")); //在 unix 系統中是"/"
System.out.println("路徑分隔符:"+props.getProperty("path.separator")); //在 unix 系統中是":"
System.out.println("行分隔符:"+props.getProperty("line.separator")); //在 unix 系統中是"/n"
System.out.println("用戶的賬戶名稱:"+props.getProperty("user.name"));
System.out.println("用戶的主目錄:"+props.getProperty("user.home"));
System.out.println("用戶的當前工作目錄:"+props.getProperty("user.dir"));