I'm launching an E4 Application installed as someProgram.exe from within another E4 Application using
Runtime.getRuntime().exec("someProgram.exe_path");
This does in fact launch the someProgram.exe but when a user starts any interaction in the someProgram.exe application, it becomes unresponsive, hangs and / or freezes. I've tried this with ProcessBuilder and "Runtime exec", in both cases someProgram.exe hangs.
I've tried the call of Runtime.getRuntime().exec("someProgram.exe_path"); from a simple Java class with a Static Main function and someProgram.exe launches and works perfectly as expected no hanging and normal response times.
Alternatively, we've used
Desktop.getDesktop().open(someProgram.exe_file);
which launches someProgram.exe perfectly without issue also, however we would like to send an argument with the launch request of someProgram.exe and Desktop unfortunately cannot provide that functionality.
Moreover, when using the "Runtime exec" method which hangs, if I quit the program calling "Runtime exec" on someProgram.exe, then someProgram.exe begins to work just fine and all hanging stops.
Also, If I put the "Runtime exec" call in a process, launch using "Runtime exec" sleep the thread, and later destroy that process then someProgram.exe quits.
Wondering if either E4 RCP application (or someProgram.exe) has something that happens in the "launch" of the application or the application life cycle of someProgram.exe which is not letting go when another program calls "Runtime exec" on it? Or if the calling application needs to call Runtime in another manner to allow it to essentially release control since control with this process doesn't seem to get returned to the launching program for it to complete its process.
Or possibly if there is another means of achieving this launch of somePrograme.exe with Args that would work without hanging.
Like I said, someProgram.exe hangs only when launched from another RCP App using a process, ProcessBuilder or "Runtime exec". A Java class calling "Runtime exec" works fine. Desktop.open() works fine as well.
Thanks in advance for your suggestions.
- Marv