brokerrmiclient.java
来自「java写的股票交易系统」· Java 代码 · 共 28 行
JAVA
28 行
package trader.rmi;
import trader.*;
import trader.gui.*;
import java.rmi.Naming;
import java.rmi.RemoteException;
public class BrokerRMIClient{
BrokerModel model;
BrokerView view;
BrokerController con;
public static void main(String args[]) {
String rmiRegistryHost = "localhost";
try {
if (args.length > 0) {
rmiRegistryHost = args[0];
}
BrokerRMIClient client = new BrokerRMIClient();
client.model = (BrokerModel)
Naming.lookup("//" + rmiRegistryHost + "/TheBroker");
client.view = new BrokerViewImpl(client.model);
client.con =
new BrokerControllerImpl(client.model, client.view);
} catch (Exception e) {
System.out.println("BrokerRMIClient exception: " + e);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?