JDK-8309155 : Release Note: JLine As The Default Console Provider
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2023-05-30
  • Updated: 2023-07-20
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 22
22Unresolved
Description
`java.io.Console` class now uses `JLine` as the default `Console` provider. The support for `JLine` console was added in JDK20. However, the user would have to explicitly specify `-Djdk.console=jdk.internal.le` to the java launcher command line in order to enable it. As a result, `System.console()` now returns a `Console` instance even if the instance is not attached to a terminal which is typically an interactive command line connected to a keyboard and display. A new method `Console.isTerminal()` is provided for detecting if the returned `Console` instance is a terminal or not.