Java System.getProperty() 方法识别的标准键的完整列表是什么?[已关闭]
2022-09-01 15:38:15
是否有一个引用页列出了 Java 方法始终接受的所有标准属性键?System.getProperty(key)
我指的不是java命令的用户可以设置的系统属性(这将是一个无限的列表),而是指运行时设置的属性(例如,等)。java.version
java.specification.version
是否有一个引用页列出了 Java 方法始终接受的所有标准属性键?System.getProperty(key)
我指的不是java命令的用户可以设置的系统属性(这将是一个无限的列表),而是指运行时设置的属性(例如,等)。java.version
java.specification.version
也许也有帮助:
显示 JVM 选取的有效属性值:
java -XshowSettings:all
比如: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html ?我会说甲骨文会有一个列表
更新(从上面的链接复制):
"file.separator" Character that separates components of a file path. This is "/" on UNIX and "\" on Windows.
"java.class.path" Path used to find directories and JAR archives containing class files. Elements of the class path are separated by a platform-specific character specified in the path.separator property.
"java.home" Installation directory for Java Runtime Environment (JRE)
"java.vendor" JRE vendor name
"java.vendor.url" JRE vendor URL
"java.version" JRE version number
"line.separator" Sequence used by operating system to separate lines in text files
"os.arch" Operating system architecture
"os.name" Operating system name
"os.version" Operating system version
"path.separator" Path separator character used in java.class.path
"user.dir" User working directory
"user.home" User home directory
"user.name" User account name
来自 https://docs.oracle.com/javase/8/docs/api/java/lang/System.html 的更完整列表
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
java.vm.specification.name Java Virtual Machine specification name
java.vm.version Java Virtual Machine implementation version
java.vm.vendor Java Virtual Machine implementation vendor
java.vm.name Java Virtual Machine implementation name
java.specification.version Java Runtime Environment specification version
java.specification.vendor Java Runtime Environment specification vendor
java.specification.name Java Runtime Environment specification name
java.class.version Java class format version number
java.class.path Java class path
java.library.path List of paths to search when loading libraries
java.io.tmpdir Default temp file path
java.compiler Name of JIT compiler to use
java.ext.dirs Path of extension directory or directories Deprecated. This property, and the mechanism which implements it, may be removed in a future release.
os.name Operating system name
os.arch Operating system architecture
os.version Operating system version
file.separator File separator ("/" on UNIX)
path.separator Path separator (":" on UNIX)
line.separator Line separator ("\n" on UNIX)
user.name User's account name
user.home User's home directory
user.dir User's current working directory
虽然有些重复,但我认为前者的描述比后者更翔实。后者列出了28个属性,而如果我打印所有属性,我的jvm以56响应,一些未在28中列出的属性包括(12),(3),10个用户属性中的7个(sun.*
*.awt.*
country.format, country, script, variant, timezone, language, language.format
)