X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fbin%2FCommandLineOperations.java;h=1761261175398814251b8086568ee5fba0f439e6;hb=b4938d8d3018957d5c5fd4443278083e8b5e0864;hp=ace18685366b623f8b224b87b71e9629c66ac6c0;hpb=6dcb8028ff88bbad2b032435b8e49ae1caeca3b6;p=jalview.git diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index ace1868..1761261 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -39,6 +39,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import io.github.classgraph.ClassGraph; +import io.github.classgraph.ModuleRef; import io.github.classgraph.ScanResult; public class CommandLineOperations @@ -124,6 +125,8 @@ public class CommandLineOperations private static String classpath = null; + private static String modules = null; + public synchronized static String getClassPath() { if (scanner == null) @@ -131,6 +134,11 @@ public class CommandLineOperations scanner = new ClassGraph(); ScanResult scan = scanner.scan(); classpath = scan.getClasspath(); + modules = ""; + for (ModuleRef mr : scan.getModules()) + { + modules.concat(mr.getName()); + } } while (classpath == null) { @@ -152,7 +160,10 @@ public class CommandLineOperations // not expanded by the shell String classpath = getClassPath(); String _cmd = "java " + (withAwt ? "-Djava.awt.headless=true" : "") - + " -classpath " + classpath + " jalview.bin.Jalview "; + + " -classpath " + classpath + + (modules.length() > 2 ? "--add-modules=\"" + modules + "\"" + : "") + + " jalview.bin.Jalview "; Process ls2_proc = null; Worker worker = null; try