![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Windows XP Support Find support for Windows XP here. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2009
Posts: 1
OS: xp
|
Why TIMEOUT does not work if calling from a Java program
I have a Java program to call a batch file before it's shut down.
I want batch file to wait for Java program to exit first, then run it's staff inside. So I used TIMEOUT 5 as the first line of my batch file. If I double click batch file to run it, it will wait 5 seconds first, and then start run the following code. But if I call it from the Java program: Runtime.getRuntime().exec("service.bat"); The batch file is not waiting 5 seconds. It's getting executed immediately. Does anyone know why and how to write code to let batch file wait for a while? |
|
|
|
| Sponsored Links |
![]() |
| Thread Tools | |
|
|