Hi ,
I have written a simple "HelloWorld", using RMI. The program works fine when in run both client and server on the same machine.
But when i run client on a different machine, i get connectionException.
I have checked the policy file and that seems to be ok, i mean no restriction.
Serverside rebind code:
LocateRegistry.createRegistry(2002);
Registry registry = LocateRegistry.getRegistry(2002);
registry.rebind("Hello", obj);
System.out.println("HelloImpl bound in registry");
client side look-up code:
Registry registry = LocateRegistry.getRegistry(2002);
Hello obj = (Hello)registry.lookup("//134.168.56.47:2002"+"/Hello");
String message = obj.sayHello();
System.out.println(message);
Can some one tell me what i am doing wrong ?
TIA
praveen.