[jdk20] RFR: 8299689: Make use of JLine for Console as "opt-in"

Alan Bateman alanb at openjdk.org
Sat Jan 7 10:38:59 UTC 2023


On Fri, 6 Jan 2023 17:57:47 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> Due to the fact that JLine spawns native processes to obtain terminal information on macOS/Linux, we decided to disable the JLine by default for performance degradation reasons. It is still possible to enable it by specifying it on the command line with `jdk.console` system property (not a public one though). Once we have a solution to avoid spawning processes, JLine may be back for use in the future.

src/java.base/share/classes/jdk/internal/io/JdkConsoleProvider.java line 35:

> 33:  * designates the module name of the implementation, and which defaults
> 34:  * to "java.base". If no providers is available,
> 35:  * or instantiation failed, java.base built-in Console implementation

The overall change looks fine but I think for the next edit that we should move most of this comment to Console as it's Console that selects the behavior and that skips errors. Also once the SM execution mode goes away then we can re-visit that behavior.

-------------

PR: https://git.openjdk.org/jdk20/pull/88


More information about the core-libs-dev mailing list