JDK-8299690 : Make use of JLine for Console as "opt-in"
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.io
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 20
  • Submitted: 2023-01-05
  • Updated: 2023-01-09
  • Resolved: 2023-01-06
Related Reports
CSR :  
Description
Summary
-------

Making the support for "JLine" based `Console` as "opt-in"

Problem
-------

The enhancement introduced in JDK-8295803 uses the `JLine` library (`jdk.internal.le` module) as the `java.io.Console` implementation by default. This resulted in the performance regression as reported in JDK-8299137.

Solution
--------

Making the support for `JLine` optional. By default, JDK 20 will work like all previous releases. The JDK internal (and undocumented) system property `jdk.console` can be used to select the `JLine` implementation with  `-Djdk.console=jdk.internal.le`.

A future JDK release will re-visit this once the performance issue in `JLine` initialization is resolved.


Specification
-------------

N/A. This is a behavioral change only.


Comments
Moving to Approved for both JDK 20 and 21 to allow pushing to either release.
06-01-2023

This change is essentially just disable the default use of jline due the cost of its initialization. The issue is understood but too late to address in JDK 20.
05-01-2023