Undocumented Hotspot OpenJDK System properties

Viewed 56

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."

1 Answers

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.

Related