diff options
author | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2005-10-10 22:52:40 +0000 |
---|---|---|
committer | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2005-10-10 22:52:40 +0000 |
commit | b1f103d14521610557a5d2d65f3ae16a5c26ad16 (patch) | |
tree | a831cde3b8a75a0d3d18e1e37aba5f4e7f5a5f0a /examples | |
parent | 8fa3a74a5c9cfbbefa75f2d40892818c8de31e8e (diff) | |
download | classpath-b1f103d14521610557a5d2d65f3ae16a5c26ad16.tar.gz |
2005-10-10 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java (main):
3 sec pause replaced by while(..) loop.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java index 85f233a1d..df6002f77 100644 --- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java +++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.classpath.examples.CORBA.SimpleCommunication; +import java.io.File; + import gnu.classpath.examples.CORBA.SimpleCommunication.communication.DirectTest; import gnu.classpath.examples.CORBA.SimpleCommunication.communication.RequestTest; @@ -61,6 +63,10 @@ public class Demo { public static void main(final String[] args) { + File ior = new File("IOR.txt"); + if (ior.exists()) + ior.delete(); + // Start the server. new Thread() { @@ -70,14 +76,20 @@ public class Demo } }.start(); - System.out.println("Waiting for three seconds for the server to start..."); - - // Pause some time for the server to start. - try { - Thread.sleep(3000); - } - catch (InterruptedException ex) { - } + while (!ior.exists()) + { + System.out.print("Waiting for for the server to start "); + // Pause some time for the server to start. + try + { + Thread.sleep(200); + } + catch (InterruptedException ex) + { + } + System.out.print("."); + } + System.out.println("ok."); // Test the stream oriented communication. DirectTest.main(args); |