Is it necessary or important to set a class path in the registry for RMI to work correctly?
            Asked
            
        
        
            Active
            
        
            Viewed 675 times
        
    4
            
            
        - 
                    http://stackoverflow.com/questions/9440619/how-do-i-set-the-classpath-that-rmiregistry-uses – AJ. Jan 07 '14 at 08:50
 - 
                    well, if you are right then thank you a lot! But nonetheless I just want to hear the others what they know ;-) – Jan 07 '14 at 08:52
 
1 Answers
4
            Contrary to @Rahul's baseless assertion, it is indeed necessary to set a CLASSPATH for the RMI Registry, unless:
- You are starting the Registry from a directory which is also the head of a package structure of .class files.
 - You are using the codebase feature, or
 - You are starting the Registry in the same JVM as your RMI remote obects, via 
LocateRegistry.createRegistry(). 
If you don't do one of these four things, you will get a ServerException wrapping a ClassNotFoundException when you bind your remote object(s) to the Registry.
        user207421
        
- 305,947
 - 44
 - 307
 - 483
 
- 
                    1Oh awesome! I really don't know what to say. Thank you very much. You really helped me a lot. – Jan 07 '14 at 09:32