<classpathentry kind="lib" path="lib/jfreesvg-2.1.jar"/>
<classpathentry kind="lib" path="lib/quaqua-filechooser-only-8.0.jar"/>
<classpathentry kind="lib" path="lib/VAqua5-patch.jar"/>
+ <classpathentry kind="lib" path="utils/classgraph-4.1.6.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
lib/biojava-ontology-4.1.0.jar LGPLv2.1 - latest license at https://github.com/biojava/biojava/blob/master/LICENSE
+Libraries for Test Suite
+
+utils/classgraph-4.1.6.jar: BSD License - allows recovery of classpath for programmatic construction of a Java command line to launch Jalview
+ version 4.1.6 downloaded from https://mvnrepository.com/artifact/io.github.classgraph/classgraph/4.1.6
+
+
Additional dependencies
examples/javascript/deployJava.js : http://java.com/js/deployJava.js
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ScanResult;
+
public class CommandLineOperations
{
}
}
- private Worker jalviewDesktopRunner(boolean withAwt, String cmd,
- int timeout)
+ private static ClassGraph scanner = null;
+
+ private static String classpath = null;
+
+ public synchronized static String getClassPath()
{
- String cp_sep = ":";
- if (System.getProperty("os.name").indexOf("Windows") >= 0)
+ if (scanner == null)
+ {
+ scanner = new ClassGraph();
+ ScanResult scan = scanner.scan();
+ classpath = scan.getClasspath();
+ }
+ while (classpath == null)
{
- cp_sep = ";";
+ try
+ {
+ Thread.sleep(10);
+ } catch (InterruptedException x)
+ {
+
+ }
}
+ return classpath;
+ }
+ private Worker jalviewDesktopRunner(boolean withAwt, String cmd,
+ int timeout)
+ {
// Note: JAL-3065 - don't include quotes for lib/* because the arguments are
// not expanded by the shell
+ String classpath = getClassPath();
String _cmd = "java "
+ (withAwt ? "-Djava.awt.headless=true" : "")
- + " -classpath ./classes" + cp_sep
- + "./lib/* jalview.bin.Jalview ";
- System.out.println("CMD [" + cmd + "]");
+ + " -classpath " + classpath + " jalview.bin.Jalview ";
Process ls2_proc = null;
Worker worker = null;
try