hi, i have a problem with an rmi program.when i start the registry explicitly ,the server connects.but if i try to start the registry through program and bind it doesnt work.also the gethost(),getcodebase() doesn't work.i have to give explicitly localhost to make the program work. any ideas.thanx beforehand. -manjeet
Perhaps a snippet of the code you use to bind (rebind) to the rmi registry might shed a bit more light on the problem. Sean
Joined: Mar 22, 2001
if i go for the case a starting the registry externally it works Naming.rebind("rmi://localhost/ChatServerImpl",cs); but if i go for case b reg=LocateRegistry.createRegistry(5050); reg.bind("rmi://localhost/ChatServerImpl",cs) it does't work. also using cs=(ChatServer)Naming.lookup("rmi//"+getCodeBase().getHost()+"/ChatServerImpl"); doesnt work. besides this,in my chat application i am able to make the server register and give its methods to the client.but for the chat client using UnicastRemoteObject.exportObject(this); doesn't work. the chat cant work if the client cant export its methods in this way.any ideas?thanks beforehand!