After update java to latest version 7u25, the runtime.getruntime().exec can't work anymore.
//jhghai_w.filepath = "C:\\aucs\\data\\tmp.txt";
br = new BufferedReader(new InputStreamReader(Runtime.getRuntime()
.exec("CMD.EXE /C \"C:\\Program Files\\juman\\juman.exe \" -e < "+jhghai_w.filepath)
.getInputStream()));
I already read the reference:JDK 7u25: Solutions to Issues caused by changes to Runtime.exec https://blogs.oracle.com/thejavatutorials/entry/changes_to_runtime_exec_problems
and tried some modifications as below:
br = new BufferedReader(new InputStreamReader(Runtime.getRuntime()
.exec("CMD.EXE /C \"C:\\Program Files\\juman\\juman.exe -e < \""+jhghai_w.filepath)
.getInputStream()));
and this:
br = new BufferedReader(new InputStreamReader(Runtime.getRuntime()
.exec(new String[] {"cmd","/C" "C:\\Program Files\\juman\\juman.exe"-e < ",jhghai_w.filepath})
.getInputStream()));
and this:
br = new BufferedReader(new InputStreamReader(Runtime.getRuntime()
.exec(new String[] {"cmd","/C" "C:\\Program Files\\juman\\juman.exe","-e“,”<",jhghai_w.filepath})
.getInputStream()));
and this:
br = new BufferedReader(new InputStreamReader(Runtime.getRuntime()
.exec(new String[] {"cmd","/C" "\"C:\\Program Files\\juman\\juman.exe"","\"-e < \"",jhghai_w.filepath})
.getInputStream()));
I even replace the "jhghai_w.filepath" to "C:\aucs\data\tmp.txt" directly. But the are not working. What's the problem in my modification?