在Windows 10系统上全新安装Repast Symphony 2.5.0(Win 64bit)和JDK 9.0.1之后,在导入JZombies_Demo示例时,无法使用默认配置启动模型。
错误提示:
An internal error occurred during: "Launching JZombies_Demo Model".
org.codehaus.groovy.eclipse.core.builder.GroovyClasspathContainer.<init>(Lorg/eclipse/core/resources/IProject;)V
当我编辑默认运行配置时,在“依赖关系”选项卡中,我仅看到JRE系统库,而没有看到其他内容。在同一选项卡中,启用了“还原默认条目”-当我按它时,将添加Repast Symphony的所有依赖项,并且先前的错误消失。但是,在这种情况下,尝试启动另一个错误时:
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)
我还在Repast Mailing List上阅读了有关此问题的信息,并看到人们谈论
boot.properties
文件夹中缺少X\eclipse\plugins\repast.simphony.runtime_2.5.0
文件。但是,该文件在此位置良好。因此,我尝试将其链接到先前的错误,并看到(RepastMain.java:43)
的pathInfo
值实际上是X\eclipse\plugins\repast.simphony.bin_and_src_2.5.0
。因此,我尝试将boot.properties
从运行时目录复制到bin_and_src-这消除了先前的错误,但是带来了许多与UI初始化和错误有关的警告: repast.simphony.ui.RSUIPlugin - Fatal error starting Repast
java.lang.NoSuchMethodError: com.jgoodies.forms.layout.ColumnSpec.createGap(Lcom/jgoodies/forms/layout/ConstantSize;)Lcom/jgoodies/forms/layout/ColumnSpec;
at com.jgoodies.forms.layout.FormSpecs.<clinit>(FormSpecs.java:115)
at repast.simphony.ui.RunOptionsPanel.initComponents(RunOptionsPanel.java:114)
at repast.simphony.ui.RunOptionsPanel.<init>(RunOptionsPanel.java:39)
at repast.simphony.ui.RSGui.addRunOptionsView(RSGui.java:558)
at repast.simphony.ui.RSApplication.initGui(RSApplication.java:655)
at repast.simphony.ui.RSAppConfigurator.fillBars(RSAppConfigurator.java:52)
at saf.core.ui.GUICreatorDelegate.createDisplay(GUICreatorDelegate.java:160)
at saf.core.ui.GUICreator.createDisplay(GUICreator.java:12)
at repast.simphony.ui.RSUIPlugin$1.run(RSUIPlugin.java:102)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
看到所有这些内容之后,我们感到很沮丧,并尝试重新安装Repast和JDK,情况仍然没有改变。还需要注意的是,对于其他示例和新创建的Repast项目,也观察到相同的行为。
很高兴听到您对导致此类Repast行为的意见。
最佳答案
看来这是Java 9兼容性的问题。您可以使用最新的Java 8尝试全新安装吗?同时,我们将跟进以实现Java 9兼容性将需要在Repast Simphony中进行哪些更改。