| JDK 21 | JDK 25 | JDK 26 |
|---|---|---|
| 21.0.11-oracleFixed | 25.0.3-oracleFixed | 26 b13Fixed |
|
CSR :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
In prior JDK releases, `System.console()` could return a `Console` instance even when the JVM was not attached to an interactive terminal. This could lead to confusion, particularly when input was not from a keyboard or output was redirected, such as to or from a file or pipe, especially when using methods like `readPassword()`. Starting with JDK 25, the default behavior has changed: `System.console()` now returns `null` if standard input and/or output is redirected. However, if a JLine-based Console implementation is explicitly specified via the system property `-Djdk.console=jdk.internal.le`, the previous behavior may still occur.
|