Sep 21

The Registry class provides a list() method for this purpose.


// Find registry (on default port 1099)

Registry registry = LocateRegistry.getRegistry();

// Get list of names bound to this registry

String[] boundNames = registry.list();
for (String name : boundNames)
{
   System.out.println(name);
}

written by objects \\ tags: ,


2 Responses to “How do I find all names bound in the RMI Registry?”

  1. Jared Says:

    bound names should be declared as a String array

    String[] boundNames = registry.list();

  2. objects Says:

    fixed, thanks

Leave a Reply

You must be logged in to post a comment.