2017-11-17 17 views
2

일부 내부 조치를 사용하는 jason 코드를 구현하려고합니다. (에이전트 코드의내부 조치가로드되지 않았습니다. 오류 : java.lang.ClassNotFoundException

MAS peleus { 
    infrastructure: Centralised 
    agents: 
     peleus;    
} 

부 :

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 파일은 다음과 같습니다 : 인터프리터가 나타났다대로, 내부 동작의 "자바"코드를 찾을 수없는 것을 보여주고있다 펠리페 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). 

나는 그것이 어떻게 특정 위치에서 자바 파일을 검색하기 위해 제이슨을 설정, 폴더 구조에 대한 추측?

폴더 구조는 다음과 같다 :

Peleus\src\org\soton\peleus for java files 
Peleus\examples for mas2j and asl tested project 
+0

스택 트레이스를 인용구로 사용하지 말고 원래 들여 쓰기가 유지되도록 코드 형식을 사용하십시오. –

답변

1

그것은 모든 응용 프로그램을 실행하는 방법에 따라 달라집니다.

  • java를 사용하는 경우 누락 된 클래스를 포함하도록 CLASSPATH를 정의해야합니다. 당신이 제이슨 스크립트 (즉, Ant를 사용)를 사용하는 경우
  • 는 .mas2h 파일은 클래스 경로 FAQ에 그에서뿐만 아니라

더 포함되어야한다. CLASSPATH는 .class 파일이 아닌 .java 파일이있는 곳입니다. 오류는 누락 된 클래스가 아니라 누락 된 소스 코드에 관한 것입니다.