client.java
来自「本书中的源代码是以JBuilder工程形式组织的」· Java 代码 · 共 18 行
JAVA
18 行
import java.rmi.*;
public class Client
{
public static void main(String[] args)
{
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
try {
DisplayInterface obj = (DisplayInterface) Naming.lookup("/Display");
String message = obj.displayName();
System.out.println(message);
} catch (Exception e) {
System.out.println("Client exception: " +e);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?