JAL-3210 removing overly complicated logging. Settling for System.out.println and...
[jalview.git] / src / jalview / bin / MemorySetting.java
index ac1ac28..561fea5 100644 (file)
@@ -16,6 +16,8 @@ public class MemorySetting
 
   public final static String maxHeapSizeProperty = "jvmmemmax";
 
+  protected static boolean logToClassChecked = false;
+
   public static long getMemorySetting()
   {
     return getMemorySetting(null, null);
@@ -71,7 +73,8 @@ public class MemorySetting
       } catch (NumberFormatException e)
       {
         memmax = maxHeapSizeDefault;
-        System.out.println("MemorySetting Property '" + maxHeapSizeProperty
+        System.out.println("MemorySetting Property '"
+                + maxHeapSizeProperty
                 + "' ("
                 + jvmmemmaxorig + "') badly formatted, using default ("
                 + memmax + ").");
@@ -105,7 +108,8 @@ public class MemorySetting
     else
     {
       // no need to warn if no setting
-      // System.out.println("MemorySetting Property '" + maxHeapSizeProperty + "' not
+      // System.out.println("MemorySetting Property '" + maxHeapSizeProperty
+      // + "' not
       // set.");
     }
 
@@ -144,7 +148,7 @@ public class MemorySetting
     boolean memoryPercentError = false;
     try
     {
-      pcmem = MemoryPercent.memPercent(percent);
+      pcmem = MemoryPercent.memPercentAmount(percent);
     } catch (Throwable t)
     {
       memoryPercentError = true;
@@ -153,7 +157,7 @@ public class MemorySetting
               + "). Likely to be problem with com.sun.management.OperatingSystemMXBean");
       t.printStackTrace();
     }
-    // In the case of an error reading the percentage if physical memory, let's cap maxMemLong to 8GB
+    // In the case of an error reading the percentage of physical memory (when jvmmempc was set), let's cap maxMemLong to 8GB
     if (memoryPercentError && jvmmempc != null && pcmem == -1
             && memmax > noMemMaxHeapSizeDefault)
     {