Good evening,
I've searched all the posts regarding RMI in this forum and in the
Java Intermediate forum and have not found any that address my issues. Can someone please help me?
I'm using Eclipse SDK 3.1.0 to run a small RMI program (if I can get this to work, I can get back to working on my B&S project). If I don't manually start the RMI server via the command line, I get a ConnectionException even though LocateRegistry.createRegistry(1099) is being invoked inside the server code. I understood that by invoking createRegistry(), it would start the RMI server, is this correct?
If I run the RMI server before running the program I then get a NotBoundException invoking Naming.lookup(). I started the RMI server at the root level (E:\ drive). Do I need to start the RMI server in the directory where the stub and skeleton is or where the class files are? My stub and skeleton are in a folder together, a subdirectory where all my class and java files are.
Perhaps the NotBoundException is due to my lack of understanding of what exactly is the parameter for the Naming.lookup()? It's the directory to what, the skeleton directory?
While searching other RMI posts, one post brought on a question about where the stub and skeleton should reside. If I have a client and server jar file, shouldn't the stub reside in the client jar file and the skeleton in the server jar file?
Thanks for you time and feedback!