尝试在Java中将IMPS与JADE结合使用时发生ClassNotFoundException

时间:2019-06-03 21:58:05

标签: java cmd agents-jade

当尝试在cmd中使用jade运行imp时,出现此错误“ java.lang.ClassNotFoundException:jade.core.migration.InterPlatformMobilityService”,但是当我在netbeans中运行它时,它运行正常,没有错误。

我已经将类路径设置为netbeans正在使用的相同路径,但是没有运气。我使用jar -xvm解压缩了jade提供的imps文件夹。

这是我尝试运行的

java jade.Boot -port 2000 -gui -accept-foreign-agents true -services jade.core.mobility.AgentMobilityService;jade.core.migration.InterPlatformMobilityService;jade.core.event.NotificationService

这是我从echo%CLASSPATH%获得的类路径

C:\...\javaLibs\jade\lib\jade.jar; C:\...\javaLibs\jade\lib\jadeTools.jar; C:\...\javaLibs\jade\lib\http.jar; C:\...\javaLibs\jade\lib\commons-codec\commons-codec-1.3.jar; C:\...\javaLibs\jade\add-ons\ipms\lib\migration.jar;

这是错误

WARNING: Exception initializing service jade.core.migration.InterPlatformMobilityService
jade.core.ServiceException: An error occurred during service activation - Caused by:  jade.core.migration.InterPlatformMobilityService
        at jade.core.AgentContainerImpl.startService(AgentContainerImpl.java:1169)
        at jade.core.AgentContainerImpl.initAdditionalServices(AgentContainerImpl.java:450)
        at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:389)
        at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:502)
        at jade.core.Runtime.createMainContainer(Runtime.java:159)
        at jade.Boot.main(Boot.java:89)
Nested Exception:
java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:332)
        at jade.core.AgentContainerImpl.startService(AgentContainerImpl.java:1153)
        at jade.core.AgentContainerImpl.initAdditionalServices(AgentContainerImpl.java:450)
        at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:389)
        at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:502)
        at jade.core.Runtime.createMainContainer(Runtime.java:159)
        at jade.Boot.main(Boot.java:89)

这应该能够与IMPS一起运行JADE gui,以动员代理商

0 个答案:

没有答案