JDK-8298425 : System.console().readLine() hangs in jshell
  • Type: Bug
  • Component: tools
  • Sub-Component: jshell
  • Affected Version: 20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-12-08
  • Updated: 2022-12-19
  • Resolved: 2022-12-14
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 JDK 21
20 b28Fixed 21Fixed
Related Reports
Relates :  
Relates :  
Description
Now that Console defaults to jline implementation and `System.console()` returns it, jshell needs to either disable `jline` implementation by specifying `-Djdk.console=java.base` in the launcher command argument, or implement its own JdkConsole. Since it is past RDP1 for JDK20, the former solution is doable in JDK20.
Comments
Changeset: 9bcdfc42 Author: Jan Lahoda <jlahoda@openjdk.org> Date: 2022-12-14 11:36:04 +0000 URL: https://git.openjdk.org/jdk20/commit/9bcdfc428597e1465c8a014d816ef671420d22df
14-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk20/pull/11 Date: 2022-12-09 13:14:59 +0000
09-12-2022