?? myclient.java
字號:
import java.rmi.*;
import java.util.*;
public class MyClient
{
public static void main(String [] args) throws RemoteException {
new MyClient( args[0] );
}
public MyClient(String host)
{
try {
RmtServer server = (RmtServer)
Naming.lookup("rmi://"+host+"/MyServer");
System.out.println("the next will call remote method");
System.out.println( server.getDate() );
System.out.println( server.task( new MyCalculation(2,3) ) );
} catch (java.io.IOException e) {
e.printStackTrace();
} catch (NotBoundException e) {
e.printStackTrace();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -