Skip to content

Commit 0922260

Browse files
Improve error message in headless mode (#3685)
2 parents 2a56855 + 2aa39bb commit 0922260

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,11 @@ public static MainWindow getInstance() {
394394
public static MainWindow getInstance(boolean ensureIsVisible) {
395395
if (GraphicsEnvironment.isHeadless()) {
396396
LOGGER.error(
397-
"Error: KeY started in graphical mode, " + "but no graphical environment present.");
398-
LOGGER.error("Please use the --auto option to start KeY in batch mode.");
397+
"Error: KeY started in graphical mode, but no graphical environment present or supported.");
398+
LOGGER.error(
399+
"If this is unexpected, ensure that you are not using a headless version of Java " +
400+
"(or force windowed mode with java parameter -Djava.awt.headless=false).");
401+
LOGGER.error("Otherwise, please use the --auto option to start KeY in batch mode.");
399402
LOGGER.error("Use the --help option for more command line options.");
400403
System.exit(-1);
401404
}

0 commit comments

Comments
 (0)