次のように、Java コードで iconv コマンドを実行しています。
Runtime runt=Runtime.getRuntime();
Process proc=null;
String c="bash -c C:\\Program Files\\GnuWin32\\bin\\iconv -f ISO-8859-6 -t UTF-8 C:\\Users\\toshiba\\workspace\\SPA\\StanfordSegmenter\\fichierIn.txt > C:\\Users\\toshiba\\workspace\\SPA\\StanfordSegmenter\\fichierOut.txt'";
try {
proc= runt.exec(c);
System.out.println("exécution de la commande iconv");
} catch (IOException e1) {
StackTraceElement[] er= e1.getStackTrace();
JOptionPane.showMessageDialog(null, er , "Erreur", JOptionPane.ERROR_MESSAGE);
}
問題は、出力ファイルが空であることです。
どうすればこの問題を解決できますか? 私を助けてくれる人はいますか?