JDK-8299687 : Modify JLine library not to spawn native processes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: linux
  • CPU: generic
  • Submitted: 2023-01-05
  • Updated: 2023-10-10
  • Resolved: 2023-05-22
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The `JLine` library used by `java.io.Console` spawns native processes by default on macOS/Linux platforms. (https://github.com/jline/jline3#jansi-vs-jna)
This imposes performance impact and should be replaced with JNI calls to the platform native libraries.
Comments
> This enhancement should involve the availability of tty, as reported in JDK-8302160. So how is that provided? I could not find any replacement for `System.console() != null` in https://github.com/openjdk/jdk/pull/13687.
10-10-2023

[~bdaloze] I can't tell if you have jumped on the wrong issue or not. Are you looking for Console::isTerminal method? This was added as part of JDK-8308591.
10-10-2023

I found it, it is available since 22 as java.io.Console#isTerminal(), thank you.
10-10-2023

Resolved by JDK-8306983
22-05-2023

This enhancement should involve the availability of tty, as reported in JDK-8302160.
09-02-2023