cli length limit
[jalview.git] / src / jalview / util / Platform.java
index c353bc2..283628e 100644 (file)
@@ -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