System.getProperty()参数:
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 |
pecifijava.vm.scation.name | Java Virtual Machine specification name |
ersionjava.vm.v | Java Virtual Machine implementation version |
endor java.vm.v | Java Virtual Machine implementation vendor |
ame java.vm.n | Java Virtual Machine implementation name |
ificatjava.specion.version | Java Runtime Environment specification version |
ificatjava.specion.vendor | Java Runtime Environment specification vendor |
ificatjava.specion.name | Java Runtime Environment specification name |
s.versjava.clasion | Java class format version number |
s.pathjava.clas | Java class path |
ary.pajava.librth | List of paths to search when loading libraries |
mpdir java.io.t | Default temp file path |
iler java.comp | Name of JIT compiler to use |
dirs java.ext. | Path of extension directory or directories |
os.name | Operating system name |
os.arch | Operating system architecture |
os.version | Operating system version |
rator file.sepa | File separator ("/" on UNIX) |
rator path.sepa | Path separator (":" on UNIX) |
rator line.sepa | Line separator ("n" on UNIX) |
user.name | User's account name |
user.home | User's home directory |
user.dir | User's current working directory |
例如:要获得各个OS系统的分割符
String sysSep = System.getProperty("file.separator");
日文系统下sysSep为"/",中文系统和UNIX系统是"/"。