I am trying to follow the example you provided so my code is as follows:
Process process = Runtime.getRuntime().exec("cmd.exe");
Expect expect = new ExpectBuilder()
.withInputs(process.getInputStream())
.withOutput(process.getOutputStream())
.withTimeout(1, TimeUnit.SECONDS)
.withExceptionOnFailure()
.build();
expect.sendLine("echo HELLO");
expect.sendLine("java -jar ");
String list = expect.expect(regexp("\n$")).getBefore();
System.out.println("List: " + list);
Is there a way to make this to work on windows??
thanks
Ahmad
--
You received this message because you are subscribed to the Google Groups "Yet another Expect for Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-expecti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.