📄 remoteclient.java
字号:
import java.rmi.RMISecurityManager;
import java.rmi.Naming;
public class RemoteClient{
public static void main(String args[]){
//you can can shield SecurityManager
System.setSecurityManager(new RMISecurityManager());
try{
RemoteInterface server=(RemoteInterface)Naming.lookup("ServerTest");
String serverString=server.message("Hello,nice meet you!");
System.out.println("The server says:\n"+serverString);
}catch(Exception e){
System.out.println("Error while performing RMI");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -