--- old/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/EchoImpl.java 2012-07-11 09:45:06.224908409 -0700 +++ new/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/EchoImpl.java 2012-07-11 09:45:06.000904843 -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 @@ -64,8 +64,9 @@ System.out.println("EchoServer: creating remote object"); EchoImpl impl = new EchoImpl(protocol); + int registryPort = Integer.parseInt(System.getProperty("rmi.registry.port")); System.out.println("EchoServer: binding in registry"); - Naming.rebind("//:" + TestLibrary.REGISTRY_PORT + + Naming.rebind("//:" + registryPort + "/EchoServer", impl); System.out.println("EchoServer ready."); } catch (Exception e) {