📄 chatserver.java
字号:
package chatrmio;import java.rmi.*;import java.rmi.registry.*;public class ChatServer{ public static void main(String[] args) {//设置安全管理 System.setSecurityManager(new RMISecurityManager()); // 建立服务对象,并与名绑定 try { //构建服务对象service ChatService service = new ChatService(); //并与名绑定 Naming.bind("//localhost/IChatService",service); System.out.println("Service Started"); } catch(Exception e) { System.out.println(e); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -