0

没有错误没有输出,不明白哪里出错了。

String[] commands = new String[] {"maude", "in 1.maude", "red f(a, b, e) ."};
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(commands);
InputStream stdin = proc.getInputStream();
InputStreamReader isr = new InputStreamReader(stdin);
BufferedReader br = new BufferedReader(isr);
String line = br.readLine();
while ( (line = br.readLine()) != null) {
    jTextArea4.append(line + "\n");
}

最初,我有一个字符串数组,第一个运行 Maude 控制台,第二个是 Maude 控制台的命令,说明我们感兴趣的模块(文件)是什么(加载什么文件),最后一个是检查 Maude 模块中某些属性的实际命令!

4

1 回答 1

2

利用:

String maudeCommand = "full_path_to_maude\\maude.exe";
String[] commands = new String[] {"cmd.exe", "/c", maudeCommand, "in", "1.maude", "red", "f(a, b, e)", "."};

替换full_path_to_maudemaude.exe的位置。

于 2012-08-16T22:21:14.520 回答