From e7e7c2bf150d87b1be265fb7debbdd6eeb98a0fc Mon Sep 17 00:00:00 2001 From: dchandler Date: Tue, 1 Jul 2003 02:50:09 +0000 Subject: [PATCH] The command-line tool runs in headless mode by default, so it will work on a Linux console, e.g. The JUnit tests will too, though 'ant check' still fails because we don't sneak the -Djava.awt.headless=true into the process early enough. --- source/org/thdl/tib/input/TMW_RTF_TO_THDL_WYLIETest.java | 6 ++++++ source/org/thdl/tib/input/TibetanConverter.java | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/source/org/thdl/tib/input/TMW_RTF_TO_THDL_WYLIETest.java b/source/org/thdl/tib/input/TMW_RTF_TO_THDL_WYLIETest.java index bbd1631..f0b5997 100644 --- a/source/org/thdl/tib/input/TMW_RTF_TO_THDL_WYLIETest.java +++ b/source/org/thdl/tib/input/TMW_RTF_TO_THDL_WYLIETest.java @@ -43,6 +43,12 @@ public class TMW_RTF_TO_THDL_WYLIETest extends TestCase { } protected void setUp() { + + // Runs on Linux/Unix boxes without X11 servers: + System.setProperty("java.awt.headless", "true"); + // FIXME: ant check still fails because it doesn't see the + // above property early enough. + // We don't want to use options.txt: ThdlOptions.forTestingOnlyInitializeWithoutDefaultOptionsFile(); // We do want debugging assertions: diff --git a/source/org/thdl/tib/input/TibetanConverter.java b/source/org/thdl/tib/input/TibetanConverter.java index 62867a2..1edf910 100644 --- a/source/org/thdl/tib/input/TibetanConverter.java +++ b/source/org/thdl/tib/input/TibetanConverter.java @@ -51,6 +51,10 @@ public class TibetanConverter implements FontConverterConstants { /** * Runs the converter. */ public static void main(String[] args) { + + // Runs on Linux/Unix boxes without X11 servers: + System.setProperty("java.awt.headless", "true"); + System.exit(realMain(args, System.out)); }