RMI is a specification of the Java platform to achieve remote call. The following is a small example. This machine test passes a total of three Java classes, remote interfaces, server programs, client programs remote interface: import java.rmi. *; Public interface Helloin Extende Java.rmi.Remote {String Sayhello () THROWS RemoteException;} server program: import java.rmi. *; import java.net. *; import java.rmi.registry. *; import java.rmi.server. * ; public class Hello extends java.rmi.server.UnicastRemoteObject implements helloIn {public Hello () throws RemoteException {super ();} public String sayHello () throws RemoteException {return "Hello, World!";} public static void main (String [] args) {//system.setsecuritymanager (New java.rmi.rmisecuritymanager ()); try {hello h = new hello (); java.rmi.naming.rebind ("Hello", H); system.out. Print ("Ready ...");} catch (Exception E) {E.PrintStackTrace ();}}} In front of the server program, start the RMI registration program under the command line mode: Start RMIREGISTRY client program : Import java.rmi. *; import java.rmi.registry. *; public class helloworld {public static void main (string [] args) {//system.setproperty ("java.security.policy", "client.policy "); //System.setsec UrityManager (new java.rmi.rmisecuritymanager (); try {helloin hi = (helloin) Naming.lookup ("// fengl / hello"); for (int i = 0; i <10; i ) {system.out .println (Hi.Sayhello ();}} catch (exception e) {E.PrintStackTrace ();}}} To generate Stub and Skeleton's class with RMIC Hello before performing client programs, which is actually remotely called Realization of the underlying. Finally, the Java HelloWorld console printed Hello, World, successful calls.