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