Merge branch 'spike/relaunch_memsetingds' into spikes/jim
[jalview.git] / src / jalview / bin / Jalview.java
index 0b1cf60..f776b27 100755 (executable)
@@ -70,9 +70,15 @@ import groovy.util.GroovyScriptEngine;
 /**
  * Main class for Jalview Application <br>
  * <br>
- * start with java -classpath "$PATH_TO_LIB$/*:$PATH_TO_CLASSES$"
+ * start with: java -classpath "$PATH_TO_LIB$/*:$PATH_TO_CLASSES$" \
  * jalview.bin.Jalview
  * 
+ * or on Windows: java -classpath "$PATH_TO_LIB$/*;$PATH_TO_CLASSES$" \
+ * jalview.bin.Jalview jalview.bin.Jalview
+ * 
+ * (ensure -classpath arg is quoted to avoid shell expansion of '*' and do not
+ * embellish '*' to e.g. '*.jar')
+ * 
  * @author $author$
  * @version $Revision$
  */
@@ -150,7 +156,6 @@ public class Jalview
           af.setProgressBar(MessageManager
                   .getString("status.das_features_being_retrived"), id);
           af.featureSettings_actionPerformed(null);
-          af.featureSettings.fetchDasFeatures(dasSources, true);
           af.setProgressBar(null, id);
           synchronized (us)
           {
@@ -180,7 +185,18 @@ public class Jalview
    */
   public static void main(String[] args)
   {
-    instance = new Jalview();
+    float ONE_MB = 1048576f;
+    Runtime runtime = Runtime.getRuntime();
+    float maxMemory = runtime.maxMemory() / ONE_MB;
+    if (maxMemory < 1024 * 15)
+    {
+      System.exit();
+    }
+
+    if (System.ge)
+    {
+      instance = new Jalview();
+    }
     instance.doMain(args);
   }