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

[691 byte] By [bib1a] at [2007-11-27 3:53:07]
# 1
What is the content of your 'bat' file?
sabre150a at 2007-7-12 8:57:09 > top of Java-index,Java Essentials,New To Java...