Merge branch 'spike/relaunch_memsetingds' into spikes/jim
[jalview.git] / src / jalview / bin / Jalview.java
index adf3773..f776b27 100755 (executable)
@@ -156,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)
           {
@@ -186,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);
   }