简体   繁体   中英

Undocumented Hotspot OpenJDK System properties

I've recently discovered some undocumented system properties in the JDK's System.Logger API , in particular, jdk.logger.finder.singleton . I couldn't find any web pages which mention this system property or any property at all relating to the System.Logger API. Nor is it mentioned in the System.LoggerFinder javadoc .

The lack of information on these properties raises several questions:

  • Is it acceptable, supported, or intended for application developers to use these properties?
  • Why do the JDK developers leave undocumented properties in the openjdk implementation?

It reminds me of the file.encoding property, which I read is not a "supported mechanism."

Is it acceptable, supported, or intended for application developers to use these properties?

No, unless it's properly documented in public API, developers shouldn't use it. Different JVM/JRE implementation will most likely not support them, which will limit your target platform

Why do the JDK developers leave undocumented properties in the openjdk implementation

Because it is implementation detail and might be subject to change. Once made public, it's hard to make change without affecting consumers of this code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM