Quality Outreach Heads-up - JLine is now the Default Console Provider
David Delabassee on July 31, 2023The OpenJDK Quality Group is promoting the testing of FOSS projects with OpenJDK builds as a way to improve the overall quality of the release. This heads-up is part of a regular communication sent to the projects involved. To learn more about the program, and how-to join, please check here.
JDK 21 & JDK 22: JLine is now the Default Console Provider
In JDK 22, System.console()
has been changed to return a Console
with enhanced editing features that improve the experience of programs that use the Console
API. In addition, System.console()
now returns a Console
object when the standard streams are redirected or connected to a virtual terminal. Prior to JDK 22, System.console()
instead returned null
for these cases. This change may impact code that checks the return from System.console()
to test if the JVM is connected to a terminal. If required, the -Djdk.console=java.base
flag will restore the old behavior where the console is only returned when it is connected to a terminal. Starting JDK 22, one could also use the new Console.isTerminal()
method to test if the console is connected to a terminal.
For additional information, please check JDK-8308591.