programmatically find out if rmiregistry is running?

Is there a way to programmatically find out if the rmiregistry is running?Thanks,Nilesh
[108 byte] By [nthalia] at [2007-11-27 9:11:01]
# 1
Call Naming.lookup() or Naming.list() on it. If that throws a java.rmi.ConnectException the Registry isn't running.
ejpa at 2007-7-12 21:56:12 > top of Java-index,Core,Core APIs...