Skip to content

Commit

Permalink
Merge pull request #44796 from geoand/#44471
Browse files Browse the repository at this point in the history
Default to old console if user has not set it
  • Loading branch information
geoand authored Nov 29, 2024
2 parents d4cbdb2 + 88a0dce commit 9967650
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,17 @@ public synchronized static void uninstallRedirects() {
redirectsInstalled = false;
}

private static void checkAndSetJdkConsole() {
// the JLine console in JDK 23+ causes significant startup slowdown,
// so we avoid it unless the user opted into it
String res = System.getProperty("jdk.console");
if (res == null) {
System.setProperty("jdk.console", "java.base");
}
}

public static boolean hasColorSupport() {
checkAndSetJdkConsole();
if (Boolean.getBoolean(FORCE_COLOR_SUPPORT)) {
return true; //assume the IDE run window has color support
}
Expand Down

0 comments on commit 9967650

Please sign in to comment.