JDK-8298325 : Release Note: Console should be usable in other environments
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Withdrawn
  • OS: generic
  • CPU: generic
  • Submitted: 2022-12-07
  • Updated: 2023-01-09
  • Resolved: 2023-01-09
Description
`System.console()` historically only returned the `Console` when the Java virtual machine was associated with a character-based console device. This has changed in this release to return the `Console` object even when standard input is connected to a file or other virtual device.

This support makes use of a JDK module named `jdk.internal.le`. When creating a run-time image with the `jlink` tool then the improved console support is only available when this module is included in the run-time image. If this module is not included then `System.console()` will only return the `Console` object whe the Java virtual machine is associated with a character-based console device.

Comments
With the change in JDK-8299689, the release note should not be delivered not to confuse users.
09-01-2023