From 68258c26760263de7ca678e13ee31ee483ef79c6 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 13 Jun 2013 17:37:43 +0100 Subject: [PATCH] JAL-1314 allow 'nogui' and 'headless' as synonyms for 'nodisplay' argument and ensure awt.gui.headless=true is set as early as possible. --- src/jalview/bin/Jalview.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 5e4569a..142b4c3 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -128,6 +128,11 @@ public class Jalview + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n"); System.exit(0); } + if (aparser.contains("nodisplay") || aparser.contains("nogui") || aparser.contains("headless")) + { + System.setProperty("java.awt.headless", "true"); + headless=true; + } Cache.loadProperties(aparser.getValue("props")); // must do this before // anything else! String defs = aparser.getValue("setprop"); @@ -147,10 +152,6 @@ public class Jalview } defs = aparser.getValue("setprop"); } - if (aparser.contains("nodisplay")) - { - System.setProperty("java.awt.headless", "true"); - } if (System.getProperty("java.awt.headless") != null && System.getProperty("java.awt.headless").equals("true")) { -- 1.7.10.2