Question? Amitava Ghosh wrote at caljug: Amitava Ghosh a écrit à caljug:

Dear all, Bonjour à tous,
I am trying to call an executable(written in C++) inside a java code through a Je suis en train de faire appel à un exécutable (écrit en C + +) dans un code java par le biais d'un
batch file(where the parameters for the C++ executable are stored). fichier batch (où les paramètres pour le C + + exécutable sont stockés).
When I am using Lorsque je me sers
Process p = Runtime.getRunTime().exec(”cppexe.bat”) Processus p = Runtime.getRunTime (). Exec ( "cppexe.bat")
it is working fine but when I am using start to run the batch process in a new window as in il fonctionne correctement mais lorsque je me sers commence à courir le lot dans une nouvelle fenêtre comme dans
Process p = Runtime.getRuntime().exec(”start cppexe.bat”) Processus p = Runtime.getRuntime (). Exec ( "start cppexe.bat")
I am getting an IOException Cannot create process etc etc Je reçois une IOException Impossible de créer un processus etc etc

Answer: start is a command of cmd.exe (under Windows NT/2000 etc.). Réponse: départ est une commande de cmd.exe (sous Windows NT/2000, etc.) So you should run it instead: Donc, vous devez l'exécuter au lieu:
Process p = Runtime.getRuntime().exec(”cmd /c start cppexe.bat”); Processus p = Runtime.getRuntime (). Exec ( "cmd / c début cppexe.bat");