test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownImpl.java

Print this page

        

@@ -66,12 +66,13 @@
         }
     }
 
     public static void main(String[] args) {
         try {
+            int registryPort = new Integer(System.getProperty("rmi.registry.port"));
             Registry registry =
-                LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
+                LocateRegistry.getRegistry("", registryPort);
             ShutdownMonitor monitor = (ShutdownMonitor)
                 registry.lookup(KeepAliveDuringCall.BINDING);
             System.err.println("(ShutdownImpl) retrieved shutdown monitor");
 
             impl = new ShutdownImpl(monitor);