test/java/rmi/testlibrary/RegistryRunner.java
Print this page
@@ -54,16 +54,17 @@
/**
* Request that the registry process exit and handle
* related exceptions.
*/
- public static void requestExit() {
+ public static void requestExit(int port) {
+
try {
RemoteExiter exiter =
(RemoteExiter)
Naming.lookup("rmi://localhost:" +
- TestLibrary.REGISTRY_PORT +
+ port +
"/RemoteExiter");
try {
exiter.exit();
} catch (RemoteException re) {
}
@@ -82,11 +83,11 @@
try {
if (args.length == 0) {
System.err.println("Usage: <port>");
System.exit(0);
}
- int port = TestLibrary.REGISTRY_PORT;
+ int port = -1;
try {
port = Integer.parseInt(args[0]);
} catch (NumberFormatException nfe) {
}