Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wait some time

807588Aug 11 2009 — edited Aug 11 2009
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2009
Added on Aug 11 2009
11 comments
88 views