X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=02727518c85add9911220527b1ef0cf97fddca5f;hb=8f8dbc28e40a7e23e984882191ef2f9772bb1dbb;hp=910c94720665a082c0180d8244e051112e57bbc6;hpb=f24dacb1da56fccf05d684e2f4899facec2aecf7;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 910c947..0272751 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -57,8 +57,11 @@ public class Jalview System.out.println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n" +"-nodisplay\tRun Jalview without User Interface.\n" +"-props FILE\tUse the given Jalview properties file instead of users default.\n" - +"-groups FILE\tUse the given file to mark groups on the alignment. \nGroups file is in the following tab delimited format\n" - +"TEXTSEQUENCE_IDSEQUENCE_INDEXSTART_RESIDUEEND_RESIDUECOLOUR\n" + +"-groups FILE\tUse the given file to mark groups on the alignment." + +"\nThe first lines of the groups file lists the GroupName and GroupColours" + +" to be used in the alignment. Use the GROUPNAME label for each of your sequences. " + +"\nGROUPNAMEGROUPCOLOUR\n" + +"TEXTSEQUENCE_IDSEQUENCE_INDEXSTART_RESIDUEEND_RESIDUEGROUPNAME\n" +"SequenceID is used in preference to SequenceIndex if both are provided.\n" +"Enter ID_NOT_SPECIFIED for SEQUENCE_ID or -1 for SEQUENCE_INDEX if unknown.\n" +"COLOUR can be hexadecimal RGB or 'red', 'blue' etc.\n\n" @@ -76,10 +79,12 @@ public class Jalview System.exit(0); } + Cache.loadProperties(aparser.getValue("props")); // must do this before anything else! if (aparser.contains("nodisplay")) + { System.setProperty("java.awt.headless", "true"); - + } if (System.getProperty("java.awt.headless") != null && System.getProperty("java.awt.headless").equals("true")) { @@ -99,8 +104,6 @@ public class Jalview System.exit(0); } - Cache.loadProperties(aparser.getValue("props")); - Desktop desktop = null; if( !headless ) { @@ -145,7 +148,8 @@ public class Jalview if (! (new java.io.File(file)).exists()) { System.out.println("Can't find " + file); - System.exit(1); + if(headless) + System.exit(1); } } @@ -238,10 +242,6 @@ public class Jalview desktop.LoadFile(file, protocol, format); } } - - - if (desktop==null) - System.exit(0); } }