##################
-To run application:
+To run application...
+[ NOTE: when using the -classpath option with the '*' wildcard, the argument must be quoted to avoid shell expansion of the wildcard,
+ ALSO, the wildcard MUST be as DIR/* and not DIR/*.jar etc or it will not be interpreted correctly ]
-java -classpath "JALVIEW_HOME/lib/*:JALVIEW_HOME/jalview.jar" jalview.bin.Jalview
+on Windows use:
+ java -classpath "JALVIEW_HOME/lib/*;JALVIEW_HOME/jalview.jar" jalview.bin.Jalview
+and on MacOS or Linux:
+ java -classpath "JALVIEW_HOME/lib/*:JALVIEW_HOME/jalview.jar" jalview.bin.Jalview
Replace JALVIEW_HOME with the full path to Jalview Installation Directory. If building from source:
-java -classpath "JALVIEW_BUILD/dist/*" jalview.bin.Jalview
+ java -classpath "JALVIEW_BUILD/dist/*" jalview.bin.Jalview
##################
/**
* 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$
*/
private Worker jalviewDesktopRunner(boolean withAwt, String cmd,
int timeout)
{
+ String cp_sep = ":";
+ if (System.getProperty("os.name").indexOf("Windows") >= 0)
+ {
+ cp_sep = ";";
+ }
String _cmd = "java "
+ (withAwt ? "-Djava.awt.headless=true" : "")
- + " -classpath \"./lib/*:./classes\" jalview.bin.Jalview ";
+ + " -classpath \"./lib/*" + cp_sep
+ + "./classes\" jalview.bin.Jalview ";
System.out.println("CMD [" + cmd + "]");
Process ls2_proc = null;
Worker worker = null;
For best results use a Sun java run time environment (not the gcj gnu java, sorry!).
-If you want to the java runtime bundled with Jalview, then launch jalview like this:
+If you want to use the java runtime bundled with Jalview, then launch jalview like this:
+in Windows:
+JAVA_HOME=JALVIEW_HOME/jre JALVIEW_HOME/jre/bin/java -classpath "JALVIEW_HOME/lib/*;JALVIEW_HOME/jalview.jar" jalview.bin.Jalview
+
+in Linux:
JAVA_HOME=JALVIEW_HOME/jre JALVIEW_HOME/jre/bin/java -classpath "JALVIEW_HOME/lib/*:JALVIEW_HOME/jalview.jar" jalview.bin.Jalview
-[or
+
+in macOS:
JAVA_HOME=JALVIEW_HOME/jre/Contents/Home JALVIEW_HOME/jre/Contents/Home/bin/java -classpath "JALVIEW_HOME/lib/*:JALVIEW_HOME/jalview.jar" jalview.bin.Jalview
-in macOS]
+
+Note: ensure the -classpath argument is quoted and only use a terminating wildcard (e.g. 'DIR/*') to refer to all jar files in a directory, don't use e.g. 'DIR/*.jar'
##################