return classpath;
}
- private Worker getJalviewDesktopRunner(boolean withAwt, String cmd,
+ private Worker getJalviewDesktopRunner(boolean headless, 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" : "")
+ + (headless ? "-Djava.awt.headless=true" : "")
+ " -classpath " + classpath + " jalview.bin.Jalview ";
Process ls2_proc = null;
Worker worker = null;
+
+ System.out.println("Executing " + _cmd + cmd);
try
{
ls2_proc = Runtime.getRuntime().exec(_cmd + cmd);
} catch (Throwable e1)
{
e1.printStackTrace();
+
+ String path = "%Java_HOME%/bin/java " + _cmd + cmd;
+
+ try
+ {
+
+ ProcessBuilder builder = new ProcessBuilder(path);
+ builder.redirectErrorStream(true);
+ ls2_proc = builder.start();
+
+ } catch (IOException e)
+ {
+ String s = e.getMessage();
+ System.out.println(s);
+ }
+
}
if (ls2_proc != null)
{
return worker;
}
+ private void startProcess()
+ {
+
+
+ }
+
@BeforeTest(alwaysRun = true)
public void initialize()
{
@BeforeTest(alwaysRun = true)
public void setUpForCommandLineInputOperations() throws IOException
{
- String cmds = "-open examples/uniref50.fa -noquestionnaire -nousagestats";
+ String cmds = "headless -open examples/uniref50.fa -noquestionnaire -nousagestats";
Worker worker = getJalviewDesktopRunner(false, cmds, SETUP_TIMEOUT);
String ln = null;
int count = 0;