When I'm running a client-server application that use Java RMI, I noticed that it still seems to work even though if I didn't start "rmiregistry" in the command prompt that I was learnt to do. The diffrence in the program I noticed:
try {
LocateRegistry.getRegistry(1099).list();
System.out.println("rmiregistry WAS started before running the application"); }
catch (RemoteException e) {
LocateRegistry.createRegistry(1099);
System.out.println("rmiregistry WAS NOT started before running the application"); }
Anyone with the knowledge could sort out what's happening and how it effect the program?