JDK-8356045 : Release Note: Add Standard System Property stdin.encoding
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2025-05-01
  • Updated: 2025-05-16
  • Resolved: 2025-05-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25Resolved
Description
A new system property `stdin.encoding` has been added. This property contains the name of the recommended Charset for reading character data from `System.in`, for example, when using `InputStreamReader` or `Scanner`. By default, the property is set in a system-specific fashion based on querying the OS and user environment. Note that its value may differ from the value of the `file.encoding` property (the default Charset) and the value of the `native.encoding` property. The value of `stdin.encoding` may be overridden to be UTF-8 by providing the argument `-Dstdin.encoding=UTF-8` on the command line.