
There are more things to it like automatic class downloading etc. Permission "*:RMIPortToUse", "connect,resolve" The content of the policy file should be something like this: On Linux it is $HOME/.java.policy Unfortunately I don't know where it is on Windows. Then you should have additionally a Java policy file in your user home. The secuirty manager is needed depending on the privileges you have on your machine. Logger.getLogger("global").log(Level.SEVERE, null, ex) YourRemoteInterface interface = (YourRemoteInterface) reg.lookup("NameForYourRemoteInterface") Registry reg = LocateRegistry.getRegistry() tSecurityManager(new RMISecurityManager()) So in short you create an object of your implementation class, then you have to "make it ready for remote calls" and finally you export it to the registry so a client can look it up there.

Reg.rebind("NameForYourRemoteInterface", interface) Registry reg = LocateRegistry.createRegistry() YourRemoteInterface interface = (YourRemoteInterface) UnicastRemoteObject.exportObject(implementation) RemoteInterfaceImpl implementation = new RemoteInterfaceImpl() You can use something like the following code although it's possible to customize for example network specific settings like the protocol or ports used. Then somewhere in your server-side code you need to create an instance of this remote-methods-class an export it to the RMI registry so that it can be obtained from remote clients. create a class which implements this remote interface (nothing special to it even it will be remote methods later)

all methods have to declare a throws clause for create a remote interface for your "remote" methods This is all done by the JVM and compiler for you. For example it's not necessary any longer to start the RMI registry by hand or generate the necessary class files with the rmic tool. Unfortunately not even Sun's tutorial is up-to-date to reflect all changes. There were a lot of changes in recent versions which make the usage of RMI a lot easier. I'll try to explain you in short what you have to do in order to create a RMI application with current JDKs (version 5 or 6).
