Java系统属性
<%
//系统属性
String javaVersion = System.getProperty("java.version");
String javaVendor = System.getProperty("java.vendor");
String javaVendorUrl = System.getProperty("java.vendor.url");
String javaHome = System.getProperty("java.home");
String javaVmSpecificationVersion = System.getProperty("java.vm.specification.version");
String javaVmSpecificationVendor = System.getProperty("java.vm.specification.vendor");
String javaVmSpecificationName = System.getProperty("java.vm.specification.name");
String javaVmVersion = System.getProperty("java.vm.version");
String javaVmVendor = System.getProperty("java.vm.vendor");
String javaVmName = System.getProperty("java.vm.name");
String javaSpecificationVersion = System.getProperty("java.specification.version");
String javaSpecificationVendor = System.getProperty("java.specification.vendor");
String javaSpecificationName = System.getProperty("java.specification.name");
String javaClassVersion = System.getProperty("java.class.version");
String javaClassPath = System.getProperty("java.class.path");
String javaLibraryPath = System.getProperty("java.library.path");
String javaIoTmpdir = System.getProperty("java.io.tmpdir");
String javaCompiler = System.getProperty("java.compiler");
String javaExtDirs = System.getProperty("java.ext.dirs");
String osName = System.getProperty("os.name");
String osArch = System.getProperty("os.arch");
String osVersion = System.getProperty("os.version");
String fileSeparator = System.getProperty("file.separator");
String pathSeparator = System.getProperty("path.separator");
String lineSeparator = System.getProperty("line.separator");
String userName = System.getProperty("user.name");
String userHome = System.getProperty("user.home");
String userDir = System.getProperty("user.dir");
%>
java.version Java 运行时版本
java.home Java 的安装目录
java.class.version Java 类格式的版本号
java.class.path Java 类的查找路径
java.io.tmpdir 默认的临时目录
java.compiler Java 所使用的及时编译器
java.ext.dirs Java 扩展包的目录
os.name 操作系统的名称
os.arch 操作系统的体系结构
os.version 操作系统的版本
file.separator 文件分隔符(Unix 下为'/')
path.separator 路径分隔符(Unix 下为':')
line.separator 换行符(Unix 下为'\n')
user.name 用户帐号名
user.home 用户目录
user.dir 用户当前的工作目录