我正在尝试运行一个使用一些内部操作的jason代码。解释器显示,无法找到内部操作的“java”代码,如下所示:
Server running on http://191.36.8.42:3272
[aslparser] [peleus.asl:29] warning: The internal action class for 'org.soton.peleus.act.plan(Goals)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.plan
[aslparser] [peleus.asl:42] warning: The internal action class for 'org.soton.peleus.act.isTrue(H)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.isTrue
[peleus] Could not finish intention: intention 1: +des([on(b3,table),on(b2,b3),on(b1,b2)])[source(self)] <- ... org.soton.peleus.act.plan(Goals); !checkGoals(Goals); .print("Goals ",Goals," were satisfied") /
{Goals=[on(b3,table),on(b2,b3),on(b1,b2)]}Trigger: +des([on(b3,table),on(b2,b3),on(b1,b2)])[noenv,code(org.soton.peleus.act.plan([on(b3,table),on(b2,b3),on(b1,b2)])),code_line(29),code_src("peleus.asl"),error(action_failed),error_msg("no environment configured!"),source(self)]
[peleus] Adding belief clear(table)
这个mas2j文件如下:
MAS peleus {
infrastructure: Centralised
agents:
peleus;
}
代理人代码的一部分(由Felipe Meneguzzi编写)如下所示:
//The next line is line 28
+des(Goals) : true
<- org.soton.peleus.act.plan(Goals);
!checkGoals(Goals);
.print("Goals ",Goals," were satisfied").
+!checkGoals([]) : true <- true.
//The next line is line 40
+!checkGoals([H|T]) : true
<- .print("Checking ", H);
org.soton.peleus.act.isTrue(H);
!checkGoals(T).
我想这是关于文件夹结构,如何设置Jason来搜索特定位置的java文件?
文件夹结构如下:
Peleus\src\org\soton\peleus for java files
Peleus\examples for mas2j and asl tested project
答案 0 :(得分:4)
这完全取决于您执行应用程序的方式。
FAQ中的更多内容。请注意,CLASSPATH是找到.class文件的位置,而不是.java源代码文件。该错误涉及缺少的类,而不是缺少的源代码。