Runtime.getRuntime().exec -- Problems
Hi All
I am invoking a application like this
Runtime.getRuntime().exec("cmd /c h:\\smtbin\\myapp.bat");
from my java program.
For some reason the app does not launch.
However the app launches:
1. When I double click on the bat file in windows explorer.
2. If I put a Thread.sleep(10000) after the exec statement.
3. Even without sleep it always get lauched when I run in debug mode and step over it.
My understanding is exec launches the app in a separate process, how does putting a sleep in this thread, or running my app in debug mode have an effect.
Please let me know, what could be the problem.
Thanks
bib

