posted 19 years ago
I am trying to start 2 different rmiregistry on 2 different ports on the same PC.
I do this by:
try {
java.rmi.registry.LocateRegistry.createRegistry(1099);
System.out.println("RMI registry ready.");
} catch (Exception e) {
System.out.println("Exception starting RMI registry:");
e.printStackTrace();
}
try {
java.rmi.registry.LocateRegistry.createRegistry(2099);
System.out.println("RMI registry ready.");
} catch (Exception e) {
System.out.println("Exception starting RMI registry:");
e.printStackTrace();
}
I cannot seem to start the 2nd rmiregistry. But if i comment out the first try{} , the 2nd rmiregistry works.
I come to the conclusion that 2 rmiregistry on 2 different ports on the same PC does not work? True?