OR anything after rmi://127. . . .then it works Why ?
If I change the first number rmi://200. . . . then it dosen't work.
*5. Why Naming.rebind() dosen't work ? [size=12]
Futhermore, I would like to enhance this application to have the server running in one machine and then let the various clients (which would be on different computers) and let the clients connect to the server machine. I would like to run my RMI program in a networked environment.
I would like to make a chat application using RMI.
Hmm interesting questions. Yet I don't know all of them or simply the "why" but note the following about RMI:
* Stubs and skeletons are NOT mandatory if you are using JDK5 or higher
* If you don't have classpath set for those jar files or whatever files, I believe it "dynamically" find it for you. How I don't know. And there is another concept called "dynamic class loading" which is not related.
* security manager is needed if you want http tunnelling or dynamic class loading or creating new RMI instances everytime (called Activatable inteface)
* Naming.rebind() doesn't work ... I believe cos you need a JNDI for it to lookup which usually requires a app server
* and this is the really fun fact or note: if the server starts using IP 1 then client code MUST bind with that server using same IP1 (can't be the hostname for that computer). A simple test you can try start with 127.0.0.1 then connect with "localhost" and vice versa.
I may be wrong on some of these. Based on what you have, it looks you have read the RMI tutorial. Maybe you should read the RMI book by Rosso to get in depth understanding. I read that book earlier this year got what I needed .... and now can't recall