RMI简单示例
import org.junit.BeforeClass;import org.junit.Test;import com.rmi.client.RMIClient;import com.rmi.server.RMIServer;public class RMITest {@BeforeClasspublic static void setUpBeforeClass() throws Exception {}@Testpublic void testRMI() throws InterruptedException{RMIServer rs = new RMIServer();rs.run();Thread.sleep(100);RMIClient rc = new RMIClient();rc.run();}}
?