📄 stopsimulation.java
字号:
/**
* StopSimulation.java
*
*
*
* @author Einar Vollset <einar.vollset@ncl.ac.uk>
*
*/
package jns.dynamic;
import fake.net.Preferences;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
public class StopSimulation
{
public static void main(String[] args)
{
try
{
Registry reg = LocateRegistry.getRegistry(3778);
DynamicScheduler m_scheduler = (DynamicScheduler) reg.lookup("DynamicScheduler");
m_scheduler.stop();
System.out.println("Stopped simulation!");
}
catch(RemoteException e)
{
e.printStackTrace();
}
catch(NotBoundException e)
{
System.err.println("DynamicScheduler not bound on rmi://" + Preferences.SERVER_HOST_NAME + ":" + Preferences.SERVER_PORT_NO + "/DynamicScheduler");
System.exit(-1);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -