--- old/test/java/rmi/transport/checkFQDN/CheckFQDN.java 2012-07-13 13:17:31.030775416 -0700 +++ new/test/java/rmi/transport/checkFQDN/CheckFQDN.java 2012-07-13 13:17:30.826772168 -0700 @@ -1,5 +1,5 @@ /* - * 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 @@ -34,6 +34,7 @@ * * @library ../../testlibrary * @build CheckFQDN CheckFQDNClient CheckFQDN_Stub TellServerName + * @build TestLibrary * @run main/othervm/timeout=120 CheckFQDN */ @@ -63,7 +64,7 @@ */ public class CheckFQDN extends UnicastRemoteObject implements TellServerName { - + public static int REGISTRY_PORT =-1; static String propertyBeingTested = null; static String propertyBeingTestedValue = null; @@ -77,8 +78,8 @@ System.err.println ("\nRegression test for bug/rfe 4115683\n"); - Registry registry = java.rmi.registry.LocateRegistry. - createRegistry(TestLibrary.REGISTRY_PORT); + Registry registry = TestLibrary.createRegistryOnUnusedPort(); + REGISTRY_PORT = TestLibrary.getRegistryPort(registry); registry.bind("CheckFQDN", checkFQDN); /* test the host name scheme in different environments.*/ @@ -117,7 +118,9 @@ JavaVM jvm = new JavaVM("CheckFQDNClient", propOption + property + equal + - propertyValue + extraProp, + propertyValue + extraProp + + " -Drmi.registry.port=" + + REGISTRY_PORT, ""); propertyBeingTested=property;