JDK-8285492 : Release Note: New system properties for `System.out` and `System.err`
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • OS: generic
  • CPU: generic
  • Submitted: 2022-04-22
  • Updated: 2022-05-12
  • Resolved: 2022-04-27
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 19
19Resolved
Description
Two new system properties, `stdout.encoding` and `stderr.encoding`, have been added. The value of these system properties is the encoding used by the standard output and standard error streams (`System.out` and `System.err`). 

The default values of these system properties depend on the platform. The values take on the value of the `native.encoding` property when the platform does not provide streams for the console. The properties can be overridden on the launcher's command line option (with `-D`) to set them to `UTF-8` where required.