cli length limit
[jalview.git] / src / jalview / util / Platform.java
index e225857..283628e 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)\r
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)\r
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
  * \r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
@@ -35,5 +35,19 @@ public class Platform
     return java.lang.System.getProperty("os.name").indexOf("Mac") > -1;\r
 \r
   }\r
-\r
+  public boolean isHeadless()\r
+  {\r
+    String hdls = java.lang.System.getProperty("java.awt.headless");\r
+    \r
+    return hdls!=null && hdls.equals("true"); \r
+  }\r
+  /**\r
+   * \r
+   * @return nominal maximum command line length for this platform\r
+   */\r
+  public static int getMaxCommandLineLength()\r
+  {\r
+    // TODO: determine nominal limits for most platforms.\r
+    return 2046; // this is the max length for a windows NT system. \r
+  }\r
 }\r