http://blog.csdn.net/bryanliu1982/article/details/5205636 比如获取windows登录用户主目录
String usreHome = System.getProperty("user.home");
下面是System的属性列表
Key Meaning
------------------- ------------------------------
"file.separator" File separator (e.g., "/")
"java.class.path" Java classpath
"java.class.version" Java class version number
"java.home" Java installation directory
"java.vendor" Java vendor-specific string
"java.vendor.url" Java vendor URL
"java.version" Java version number
"line.separator" Line separator
"os.arch" Operating system architecture
"os.name" Operating system name
"path.separator" Path separator (e.g., ":")
"user.dir" User‘s current working directory
"user.home" User home directory
"user.name" User account name