From cd63a1667dfe36f249658e14dfc98f404163171a Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 28 Dec 2016 19:08:59 +0100 Subject: [PATCH] Set -Djava.awt.headless=true in EpubChecker class // fixes #665 needs to be set as early as possible in a static way --- src/main/java/com/adobe/epubcheck/tool/EpubChecker.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/adobe/epubcheck/tool/EpubChecker.java b/src/main/java/com/adobe/epubcheck/tool/EpubChecker.java index a2953c5bc..4fde0d3ad 100644 --- a/src/main/java/com/adobe/epubcheck/tool/EpubChecker.java +++ b/src/main/java/com/adobe/epubcheck/tool/EpubChecker.java @@ -62,6 +62,13 @@ public class EpubChecker { + static { + /* fix #665 (window-less "Checker" gui app on Mac) + * set -Djava.awt.headless=true programmatically as early as possible + */ + System.setProperty("java.awt.headless", "true"); + } + String path = null; String mode = null; EPUBProfile profile = null;