1

我尝试使用 repast.simpony.runtime.RepastMain 以编程方式启动 Repast-simpony。所以当我吃午饭时,saf.core.runtime.Boot 类会给出这种类型的错误:

"ERROR [AWT-EventQueue-0] 14:43:38,880 saf.core.runtime.Boot - null
java.lang.NullPointerException
    at saf.core.runtime.Boot.init(Boot.java:79)
    at saf.core.runtime.Boot.main(Boot.java:246)
    at repast.simphony.runtime.RepastMain.main(RepastMain.java:43)
    at simmasto0.util.C_ChooseProtocol.actionPerformed(C_ChooseProtocol.java:123)

"

您想帮助找到解决此问题的方法吗?亲切!

public void actionPerformed(ActionEvent e) {
    String xmlFileName = "parameters_scenario_" + e.getActionCommand() + ".txt";
    splitRepastXmlConfigFiles(xmlFileName);
    System.out.println(e.getActionCommand() + " Protocol choosed");
    String[] args = new String[]{"C:\\Users\\sallmous\\`enter code here`Documents\\Workspace_Moussa\\SIMmasto_0\\SIMmasto_0.rs"};`enter code here`
    repast.simphony.runtime.RepastMain.main(args);
    System.exit(0);
}
4

1 回答 1

2

当找不到 boot.properties 文件时,您会收到此错误。Boot 首先在场景文件夹中查找该文件,如果在该文件夹中找不到该文件(通常不会),则默认为 repast.simphony.runtime Eclipse 插件中的 boot.properties 文件。

请注意,有关从外部应用程序运行 Simphony 的更多信息,请访问:https ://repast.github.io/docs/RepastFAQ/RepastFAQ.html#_running_models

于 2019-10-07T13:24:00.423 回答