From: Jim Procter Date: Thu, 13 Jun 2013 16:37:43 +0000 (+0100) Subject: JAL-1314 allow 'nogui' and 'headless' as synonyms for 'nodisplay' argument and ensure... X-Git-Tag: Jalview_2_9~242^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=68258c26760263de7ca678e13ee31ee483ef79c6;p=jalview.git JAL-1314 allow 'nogui' and 'headless' as synonyms for 'nodisplay' argument and ensure awt.gui.headless=true is set as early as possible. --- 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")) {