Merge branch 'develop' into task/JAL-3348_document_cli_memory_settings_when_launching...
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 4 Jul 2019 00:04:51 +0000 (01:04 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 4 Jul 2019 00:04:51 +0000 (01:04 +0100)
merging in develop

getdown/lib/getdown-core.jar
getdown/lib/getdown-launcher.jar
getdown/src/getdown/ant/pom.xml
getdown/src/getdown/core/pom.xml
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/Config.java
getdown/src/getdown/launcher/pom.xml
getdown/src/getdown/pom.xml
help/help/html/memory.html
j11lib/getdown-core.jar
j8lib/getdown-core.jar

index 7849bc7..34723c1 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index 7f99732..edeadaa 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index a2f95e3..0064425 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1.4_JVL</version>
+    <version>1.8.3_1.1.7_JVL</version>
   </parent>
 
   <artifactId>getdown-ant</artifactId>
index 4cd0507..80d0c38 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1.4_JVL</version>
+    <version>1.8.3_1.1.7_JVL</version>
   </parent>
 
   <artifactId>getdown-core</artifactId>
index 2dddd6f..7c2a427 100644 (file)
@@ -286,7 +286,6 @@ public class Application
        _envc = envc;
        _config = getLocalPath(envc.appDir, CONFIG_FILE);
        _backupConfig = getLocalPath(envc.appDir, BACKUP_CONFIG_DIR+File.separator+CONFIG_FILE);
-       log.warning("Backup config file now", "_backupConfig", _backupConfig, "exists", _backupConfig.exists(), "isReadable", _backupConfig.canRead());
     }
 
     /**
@@ -820,14 +819,16 @@ public class Application
             ARG: for (int i = 0; i < _jvmargs.size(); i++) {
               if (_jvmargs.get(i) instanceof java.lang.String && _jvmargs.get(i).startsWith("-Xmx")) {
                 _jvmargs.remove(i);
+                break ARG;
               }
             }
             addAll(maxMemHeapArg, _jvmargs);
+            log.info("Max memory set", "maxMemHeapArg", maxMemHeapArg[0]);
             
           }
 
         } else if (jvmmempc != -1) {
-          System.out.println("'jvmmempc' value must be in range 0 to 100 (read as '"+Integer.toString(jvmmempc)+"')");
+          log.warning("'jvmmempc' value must be in range 0 to 100 (read as '"+Integer.toString(jvmmempc)+"')");
         }
 
         // get the set of optimum JVM arguments
@@ -1129,7 +1130,7 @@ public class Application
           if (j > -1) {
             ext = filename.substring(j+1);
           }
-          if (LOCATOR_FILE_EXTENSION.equals(ext.toLowerCase())) {
+          if (ext != null && LOCATOR_FILE_EXTENSION.equals(ext.toLowerCase())) {
             // this file extension should have been dealt with in Getdown class
           } else {
             _appargs.add(0, "-open");
index 6ad2b4f..8767ae0 100644 (file)
@@ -471,7 +471,7 @@ public class Config
 
     private final Map<String, Object> _data;
  
-    public static final List<String> allowedReplaceKeys = Arrays.asList("appbase","apparg","jvmarg"); // these are the ones we might use
+    public static final List<String> allowedReplaceKeys = Arrays.asList("appbase","apparg","jvmarg","jvmmempc"); // these are the ones we might use
     public static final List<String> allowedMergeKeys = Arrays.asList("apparg","jvmarg"); // these are the ones we might use
     //private final List<String> allowedMergeKeys = Arrays.asList("apparg","jvmarg","resource","code","java_location"); // (not exhaustive list here)
 }
index 4c6b982..4755cc6 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1.4_JVL</version>
+    <version>1.8.3_1.1.7_JVL</version>
   </parent>
 
   <artifactId>getdown-launcher</artifactId>
index 24efba8..2807be5 100644 (file)
@@ -10,7 +10,7 @@
   <groupId>com.threerings.getdown</groupId>
   <artifactId>getdown</artifactId>
   <packaging>pom</packaging>
-  <version>1.8.3-1.1.4_JVL</version>
+  <version>1.8.3_1.1.7_JVL</version>
 
   <name>getdown</name>
   <description>An application installer and updater.</description>
index e583398..396507b 100755 (executable)
   </h2>
   <p>
     When launched as an Application, Jalview automatically tries to
-    maximise the amount of memory allocated to it, but sometimes it may
-    run out of memory. This is because of the way that Java runs on a
-    computer - what is actually run is a program called a virtual
-    machine (the JVM) which executes the java instructions. The JVM has
-    limits on the memory that can be allocated to the java program - and
+    maximise the amount of memory allocated to it (default settings are
+    to try and use up to 90% of physical memory available to it).
+    Sometimes it may require more memory, or if you are working in a
+    shared memory environment you may want to limit the maximum amount
+    of memory that it might use.
+    This has to be set at the time Jalview is launched because of the way
+    that Java runs on a computer - what is actually run is a program called
+    a Java virtual machine (a JVM) which executes the java program instructions.
+    The JVM has limits on the memory that can be allocated to the java program - and
     you might need to increase them if you are working with particularly
     large datasets.<br> If Jalview has not explicitly told you that
     it has run out of memory, then a common sign is that a function that
     window's background.
   </p>
   <p>
-    <em>Increasing the memory available to Jalview</em><br>
-    Since Jalview 2.11, the program automatically configures the JVM memory settings to set the maximum memory available to Jalview to be 90% of physical memory. 
-      <p>&nbsp;</p>
+    <em>Increasing the memory available to Jalview</em><br/>
+    Since Jalview 2.11, the program automatically configures the JVM memory settings to set the maximum memory available to Jalview to be 90% of physical memory.
+    This default setting can be altered in a number of different ways, depending on how you prefer to launch Jalview and how specific you want to be with the maximum memory setting.
+  </p>
+
+  <ul>
+    <li><em><font size="3">JVL file</font></em>
+      <p>
+      The easiest way to launch Jalview with a different percentage of physical memory available is to
+      create a text file with extension <em>.jvl</em> and with content that contains the line
+      <pre>
+      jalview.jvmmempc=50
+      </pre>
+      Replace the value with the percentage of memory you wish to allocate to Jalview.
+      </p>
+      <p>
+      In Windows and in macOS you can then launch Jalview by double clicking on this file, and your memory setting will be used instead of the default value of 90.
+      </p>
+      <p>
+      In Linux or other unix variants you can launch Jalview on the command line and provide your JVL file as an argument with
+      <pre>
+      /PATH_TO_JALVIEW/Jalview /path/to/file/mymemorysetting.jvl
+      </pre>
+
+      </p>
+      <p>
+      If you want to use a memory setting like this and open a file you can use both the jvl and alignment files as command line arguments, but you must put the <em>jvl</em> file first, e.g.
+      <pre>
+      /PATH_TO_JALVIEW/Jalview /path/to/file/mymemorysetting.jvl /path/to/alignments/myalignment.fa
+      </pre>
+      alternatively, you can use the standard Jalview command line arguments with or without the jvl file (first), e.g.
+      <pre>
+       /PATH_TO_JALVIEW/Jalview /path/to/file/mymemorysetting.jvl -open http://www.jalview.org/examples/jpred_msa.fasta -annotations http://www.jalview.org/examples/jpred_msa.seq.concise -colour Clustal
+      </pre>
+      </p>
+      
+      <p>
+      You can use command line arguments to control memory settings in Windows and macOS too:
+      <br/>
+      In Windows you must use, e.g.
+      <pre>
+      \PATH_TO_JALVIEW\Jalview.exe %HOMEPATH%\mymemorysetting.jvl -open %HOMEPATH%\myalignment.fa
+      </pre>
+      and in macOS you can use the macOS <em>open</em> command like this:
+      <pre>
+      open /Applications/Jalview.app --args ~/mymemorysetting.jvl -open ~/myalignment.fa
+      </pre>
+      (put all the Jalview arguments <em>after</em> the --args parameter).
+      
+      </p>
+    </li>
+
+
+    <li><em><font size="3">Directly opening Jalview with a JVM</font></em>
+      <p>
+      Launching Jalview directly with a JVM is entirely possible, but is not recommended as automatic updates and some other default settings will not operate.
+      </p>
+      <p>
+      However by launching Jalview in this way you have full access to the Java command line arguments.
+      In particular you can set the maximum allowed memory with the <em>-Xmx...</em>  JVM argument.
+      <br/>
+      <em>-Xmx</em> should be immediately followed (no space or equals) by the maximum amount of memory that you might want to launch Jalview with.  This can be specified in bytes as just a number,
+      or in kilobytes, megabytes or gigabytes by following the number with a "k", "m" or "g" respectively.  e.g.
+      <pre>
+      -Xmx8g
+      </pre> 
+      </p>
+      <p>
+      Jalview binaries for Windows and macOS are distributed with their own JVM which you will find in
+      <ul>
+      <li><em>Windows:</em> .../Jalview/jre/bin/java.exe</li>
+      <li><em>macOS:</em> .../Jalview.app/Contents/Resources/app/jre/Contents/Home/bin/java</li>
+      </ul>
+      For linux and other unixes you will have to install a Java 1.8 JRE (we recommend the ones found at <a href="https://adoptopenjdk.net">https://adoptopenjdk.net/</a>)
+      </p>
+      <p>
+      You will also need to reference the "appdir" release folder with all of the Jalview jar files.
+      <br/>
+      On Windows this will be
+      <pre>\PATH_TO_JALVIEW\release</pre>
+      whereas on macOS it will be
+      <pre>/Applications/Jalview.app/Contents/Resources/app/release</pre>
+      and on linux or unix
+      <pre>/PATH_TO_JALVIEW/release</pre>
+      </p>
+      <p>
+      Assuming the <em>java</em> (or <em>java.exe</em> on Windows) commands are available to you, you can run, e.g.
+      <pre>
+      java -Xmx1500m -cp "/PATH_TO_RELEASE_DIR/*" jalview.bin.Jalview
+      </pre>
+      or on Windows
+      <pre>
+      java.exe -Xmx1500m -cp "\PATH_TO_RELEASE_DIR\*" jalview.bin.Jalview
+      </pre>
+      <em>Note</em> that the classpath argument wildcard must be simply a '*' and not '*.jar'. This is a limitation of Java.
+      </p>
+      <p>
+      You can also add other Jalview command line arguments as above after the <em>jalview.bin.Jalview</em> class name (you cannot use <em>jvl</em> files if launching Jalview in this way).     
+    </li>
+
+
+  </ul>
+
 </body>
 </html>
index 7849bc7..34723c1 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index 7849bc7..34723c1 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ