Re: [問題] 用java呼叫clips(.exe)
※ 引述《sonwil (阿資)》之銘言:
: Runtime rt = Runtime.getRuntime();
: Process pro=rt.exec("c:\\CLIPSwin.exe");
: OutputStreamWriter w = new OutputStreamWriter(pro.getOutputStream());
: String[] cmd = new String[] {
: "(load c:\\123.txt)",
: "(reset)"
: };
: for (int i = 0; i < cmd.length; ++i){
: w.write(cmd[i]);
: w.flush();
: }
: 程式如上 我上網找到的說clips中會出現(load c://123.txt) (reset)指令
: 請問未何我只有打開clips指令,而沒有(load c://123.txt)(resrt) 呢
ㄜ... 我不知道你的 CLIPSwin.exe 是啥
只是,你的 CLIPSwin.exe 他必須要有收 standard i/o 才行
如果是 GUI 的程式...
我沒試過耶,不過機率不大吧.... @__@
--
侃侃長論鮮窒礙 首頁:http://www.psmonkey.idv.tw
眾目睽睽無心顫 Blog:http://ps-think.blogspot.com
煢居少聊常人事
殺頭容易告白難 歡迎參觀 Java 版(@ptt.cc)精華區 \囧/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.192.168
討論串 (同標題文章)