Wait some time
807588Aug 11 2009 — edited Aug 11 2009Hi everyone!
I have a program in java that starts a VPN client and then I make some work using that client. The problem is that connecting to the client takes some time and I don't know how to wait until the client has been started. What happens is that the work I must do using the client executes before I am totally connected, therefore I don't get the work done properly.
I start the client using a Runtime.getRuntime.exec(command). I tried to use waitfor(), but it does not work because the connection to the client never finishes. When it finally got connected, it waits until the connection is finished, therefore I can't wait until the command has been executed.
Can you help me?
Thank you