我尝试使用repast.simphony.runtime.RepastMain以编程方式启动Repast-simphony。所以当我用午餐的时候,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);
}发布于 2019-10-07 21:24:00
当找不到boot.properties文件时,可能会出现此错误。Boot首先在scenario文件夹中查找该文件,如果在该文件夹中找不到该文件(通常不存在),则它将默认使用repast.simphony.runtime Eclipse插件中的boot.properties文件。
请注意,有关从外部应用程序运行模拟的更多信息,请访问:https://repast.github.io/docs/RepastFAQ/RepastFAQ.html#_running_models
https://stackoverflow.com/questions/58270247
复制相似问题