Repast模型启动的问题

时间:2017-12-07 10:46:42

标签: java windows launch java-9 repast-simphony

在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

当我编辑默认运行配置时,在Dependencies选项卡中,我只看到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邮件列表中了解了这个问题,并看到有人在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行为的看法。

1 个答案:

答案 0 :(得分:5)

看起来这是Java 9兼容性的问题。你能尝试使用最新的Java 8进行全新安装吗?与此同时,我们将跟进Repast Simphony对Java 9兼容性所需的更改。