test/java/rmi/transport/checkFQDN/CheckFQDNClient.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -56,12 +56,13 @@
         try {
             hostname = retrieveServerName();
             System.err.println("Client host name: " +
                                hostname);
 
+            int registryPort = Integer.parseInt(System.getProperty("rmi.registry.port"));
             tell = (TellServerName) Naming.lookup("rmi://:" +
-                                                  TestLibrary.REGISTRY_PORT
+                                                  registryPort
                                                   + "/CheckFQDN");
             tell.tellServerName(hostname);
             System.err.println("client has exited");
 
         } catch (Exception e ) {