📄 server.java
字号:
package flight;
import java.rmi.*;
import javax.naming.*;
public class Server {
public static void main(String args[]){
try{
Flightfactory factory=new FlightFactoryImpl();
Context namingContext=new InitialContext();
namingContext.rebind("rmi:FlightFactory", factory);
System.out.println("服务器注册了一个FlightFactory对象");
}catch(Exception e){
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -