Hi all, I was trying out the same set of RMI server codes on MAC OSX and Windows XP platform, both using
Java 6.
Strangely, in MAC OSX, the server keeps running (in terminal), whereas in Windows, the server starts and stops (in command prompt).
After some googling, it seems that in some cases, the remote object was GCed very soon, and hence the server stops.
Moving the 'service' declaration out of main method (as a static reference) fixed this problem. However, I'm not sure if this is the correct way of solving this problem. Anyone has any comment on this approach?