0

正在 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);
    }  

问题是输出文件是空的

我该如何解决这个问题?有没有人可以帮助我?

4

0 回答 0