JDK-8295803 : Console should be usable in jshell and other environments
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-10-21
  • Updated: 2023-01-05
  • Resolved: 2022-12-07
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 20
20 b27Fixed
Related Reports
Blocks :  
Blocks :  
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8298325 :  
Description
Console instance is only available when the JVM is attached to an OS provided interactive console. Otherwise `System.console()` returns `null`. This is not very useful for applications such as `jshell` in which the debugee process is not attached to a console. By providing a plug-in mechanism, custom implementations of Console can be returned with `System.console()` even when it may not be attached to the underlying platform's TTY. This also allows replacing the default Console implementation with functionality-wise better `jline`.
Comments
Changeset: 8a9911ef Author: Naoto Sato <naoto@openjdk.org> Date: 2022-12-07 20:49:29 +0000 URL: https://git.openjdk.org/jdk/commit/8a9911ef1762ae837e427ec9d91b1399ba33b6e4
07-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11421 Date: 2022-11-29 19:38:02 +0000
30-11-2022