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); }
Array ( ) 2 Responses to “How do I find all names bound in the RMI Registry?”
Leave a Reply
You must be logged in to post a comment.
May 25th, 2011 at 11:24 pm
bound names should be declared as a String array
String[] boundNames = registry.list();
May 26th, 2011 at 9:51 am
fixed, thanks