"Birmingham city" -
Please take a moment to review JavaRanch's
naming policy, and change your name accordingly; thank you.
The code above locates an RMI registry on the local system. The list() call normally returns a
String[] of named services already bound to the registry. In this example the return value is ignored, so perhaps it's invoked to provoke a possible exception.
The catch code sets up a registry if one is not found by the code in the try block. This runs a registry without establishing having to do it from the command line. This approach has become particularly popular with people who a) are
testing RMI code and want to keep things manageable from one place; and b) people who want a compromise between the cumbersomeness of 'regular' RMI and the administrative control necessary to run an RMI activation daemon.