3

System.getProperty 参数 | 月光中的污点

 3 years ago
source link: https://www.extlight.com/2021/03/18/System.getProperty-%E5%8F%82%E6%95%B0/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
System.getProperty 参数
loading.jpg

『 System.getProperty 参数 』

2021 年 03 月 18 日71 浏览

Java 提供的 System.getProperty 方法,通过传入不同参数,可以获取对应的系统信息。

名称描述java.versionJava运行时环境版本java.vendorJava运行时环境供应商java.vendor.url Java供应商的 URLjava.homeJava安装目录java.vm.specification.versionJava虚拟机规范版本java.vm.specification.vendorJava虚拟机规范供应商java.vm.specification.nameJava虚拟机规范名称java.vm.versionJava虚拟机实现版本java.vm.vendorJava虚拟机实现供应商java.vm.nameJava虚拟机实现名称java.specification.versionJava运行时环境规范版本java.specification.vendorJava运行时环境规范供应商java.specification.nameJava运行时环境规范名称java.class.versionJava类格式版本号java.class.pathJava类路径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用户的当前工作目录
#获取系统临时目录
System.getProperty("java.io.tmpdir");
复制

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK