Quantcast

Start Windows Executable won't work

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Start Windows Executable won't work

lacigas
Hi
Im trying to start a Windows Executable (Win2008R2).

            Runtime rt = Runtime.getRuntime();
            Process proc = rt.exec(args);
            StreamGobbler errorGobbler = new PrintPDF().new StreamGobbler(proc.getErrorStream(), "ERR");            
            StreamGobbler outputGobbler = new PrintPDF().new StreamGobbler(proc.getInputStream(), "OUT");
            errorGobbler.start();
            outputGobbler.start();
            int exitVal = proc.waitFor();

My problem is that proc.waitFor() never returns.
I double checked theat "args" works from the command line.
Any idea?
Laci

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Start Windows Executable won't work

lacigas
... just to be more specific... I want to execute the Windows executable from a camel route...
Loading...