java.version | Java 运行时环境版本 |
java.vendor | Java 运行时环境供应商 |
java.vendor.url | Java 供应商的 URL |
java.home | Java 安装目录 |
java.vm.specification.version | Java 虚拟机规范版本 |
java.vm.specification.vendor | Java 虚拟机规范供应商 |
java.vm.specification.name | Java 虚拟机规范名称 |
java.vm.version | Java 虚拟机实现版本 |
java.vm.vendor | Java 虚拟机实现供应商 |
java.vm.name | Java 虚拟机实现名称 |
java.specification.version | Java 运行时环境规范版本 |
java.specification.vendor | Java 运行时环境规范供应商 |
java.specification.name | Java 运行时环境规范名称 |
java.class.version | Java 类格式版本号 |
java.class.path | Java 类路径 |
java.library.path | 加载库时搜索的路径列表 |
java.io.tmpdir | 默认的临时文件路径 |
java.compiler | 要使用的 JIT 编译器的名称 |
java.ext.dirs | 一个或多个扩展目录的路径 |
os.name | 操作系统的名称 |
os.arch | 操作系统的架构 |
os.version | 操作系统的版本 |
file.separator | 文件分隔符(在 UNIX 系统中是“/”) |
path.separator | 路径分隔符(在 UNIX 系统中是“:”) |
line.separator | 行分隔符(在 UNIX 系统中是“/n”) |
user.name | 用户的账户名称 |
user.home | 用户的主目录 |
user.dir | 用户的当前工作目录 |
Tuesday, December 23, 2008
System.getProperty()
something about System class
* Among the facilities provided by the System class are
* 1. standard input, standard output, and error output streams;
* 2. access to externally defined properties and environment variables;
* 3. a means of loading files and libraries;
* 4. and a utility method for quickly copying a portion of an array.
使用System.getProperties().list(System.out);可以打印出所有的key及值
Following table is from JDK document:
Subscribe to:
Post Comments (Atom)
1. for environment variables, you can define in your OS, and get the value via key in getProperty()
ReplyDelete2. for externally predefined properties, there should be two types:
--one are the properties predefined by Sun, such as java.version, which you can get the details from JDK document.
-- the other are the properties predefined by you via setProperty() method in System class.For example:
========================
System.setProperty("osgi.parentClassloader", "app");
System.setProperty("eclipse.ignoreApp", "true");
System.setProperty("osgi.noShutdown", "true");
System.setProperty("eclipse.stateSaveDelayInterval",
"1000");
System.setProperty("osgi.console", "9000");
===========================