2012-02-14 7 views
4

私はJADEを初めて使い、エージェントのローディングに問題があります。JADEが代理店を見つけることができません

私は新しいIntelliJプロジェクトを作成し、 "依存関係"に "jade.jar"と "commons-codec-1.3.jar"(私はJADE 4.1.1を使用しています)を追加し、また、彼らに尋ねられずに試してみた)。次に、サンプルに含まれる "HelloWorldAgent.java"をsrcに追加しました。

    • メインクラス:私は、として実行構成を設定jade.Boot
    • プログラム引数:-gui testAgent:HelloWorldAgent
    • モジュールの使用クラスパス:jadeCW(私のプロジェクト名)

    この設定を使用して実行すると、JADEのユーザーは起動しますが、「HelloWorldAgent」は見つかりません。出力は次のとおりです。

    14-Feb-2012 21:43:08 jade.core.Runtime beginContainer 
    INFO: ---------------------------------- 
        This is JADE 4.1.1 - revision 6532 of 2011/11/18 16:21:34 
        downloaded in Open Source, under LGPL restrictions, 
        at http://jade.tilab.com/ 
    ---------------------------------------- 
    Retrieving CommandDispatcher for platform null 
    14-Feb-2012 21:43:08 jade.imtp.leap.LEAPIMTPManager initialize 
    INFO: Listening for intra-platform commands on address: 
    - jicp://192.168.1.66:1099 
    
    14-Feb-2012 21:43:08 jade.core.BaseService init 
    INFO: Service jade.core.management.AgentManagement initialized 
    14-Feb-2012 21:43:08 jade.core.BaseService init 
    INFO: Service jade.core.messaging.Messaging initialized 
    14-Feb-2012 21:43:08 jade.core.BaseService init 
    INFO: Service jade.core.resource.ResourceManagement initialized 
    14-Feb-2012 21:43:08 jade.core.BaseService init 
    INFO: Service jade.core.mobility.AgentMobility initialized 
    14-Feb-2012 21:43:08 jade.core.BaseService init 
    INFO: Service jade.core.event.Notification initialized 
    14-Feb-2012 21:43:08 jade.mtp.http.HTTPServer <init> 
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser 
    14-Feb-2012 21:43:08 jade.core.messaging.MessagingService boot 
    INFO: MTP addresses: http://unknown-00-19-c5-7e-cb-4b.home:7778/acc 
    14-Feb-2012 21:43:08 jade.core.AgentContainerImpl startBootstrapAgents 
    SEVERE: Cannot create agent testAgent: Class HelloWorldAgent for agent (agent-identifier :name [email protected]:1099/JADE) not found [nested java.lang.ClassNotFoundException: HelloWorldAgent] 
    14-Feb-2012 21:43:08 jade.core.AgentContainerImpl joinPlatform 
    INFO: -------------------------------------- 
    Agent container [email protected] is ready. 
    

    重要な問題は、明らかにされて:

    SEVERE: Cannot create agent testAgent: Class HelloWorldAgent for agent (agent-identifier :name [email protected]:1099/JADE) not found [nested java.lang.ClassNotFoundException: HelloWorldAgent] 
    

    私は日食を使用してみましたが、私は同じ問題を取得し、私はまた、ノー、再びJADEの以前のバージョンを使用してみましたが、運。どんな助けでも大歓迎です。

    多くのおかげであなたは、あなたがそれを起動したときに、クラスの完全修飾名を渡す必要があり

    ダン

  • 答えて

    0

    私は "jade.jar"と "commons-codec-1.3.jar"を置いた場所が問題でした(私はもともとそれらを/ Library/Java/Extensions(OSX Lion内)に入れました)。私はそれらを取り除こうとしました、それらを別の場所に入れて、もう一度試してみました。なぜ心配しているのか完全にわからない!

    4

    。私の古いバージョンのJADEではHelloWorldAgentexamples.helloパッケージに含まれています。したがって、プログラム引数:-gui testAgent:examples.hello.HelloWorldAgentを指定する必要があります。

    +0

    +1を:また、私は私のパスを追加するために必要なagentclassはクラスパス 'java -cp〜/ JADE/lib/jade.jar:〜/ JADE/helloworldagent /:jade.Boot testAgent:HelloAgent'にあります。 – PCoder

    2

    クラス名だけ

    -gui testAgent前にパッケージ名を追加します。packageName.HelloWorldAgent

    0

    あなたが追加する必要があります。

    -gui nameAgent:packageName.className 
    
    関連する問題