您的output.txt看來是由rw/run.bat所產生的
首先您的路徑是相對路徑,OS不見的找的到那個批次檔
即使找的到,
其次請檢查那個批次檔是從哪裡讀input和去哪裡寫output
tomcat和eclipse的路徑是不同的
willie
※ 引述《Kingmaxwell.bbs@bbs.ice.cycu.edu.tw (足球 好久沒碰了)》之銘言:
: String location = "3des/";
: out.write(text,location+"RW/input.txt");
: Process p = Runtime.getRuntime().exec(location+"RW/run.bat");
: String decode = in.getString(location+"RW/output.txt");
: 這段程式碼在Eclipse上可正常執行,會產生兩個檔,input.txt跟output.txt
: 但我搬到Tomcat上執行,有產生input.txt,但沒output.txt
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 69.143.17.31