Я хочу начать писать JADE в Eclipse. Для этого я добавил следующий скрипт, предоставленный Java Agent Development Framework - Eclipse and Maven integration.JADE in Eclipse ICP exception
Я сделал агент:
public class Test extends Agent {
private static final long serialVersionUID = 1L;
String nickname = "Peter";
AID id = new AID(nickname, AID.ISLOCALNAME);
protected void setup() {
// Printout a welcome message
System.out.println("Hello! Buyer-agent " +getAID().getName()+ " is ready.");
}
}
И когда я бегу мой JadeBootThread.run() со следующими параметрами:
private final String ACTOR_NAMES_args = "buyer:test.Test";
private final String GUI_args = "-gui";
Я получаю следующее сообщение об ошибке:
Jan 29, 2015 5:33:33 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
This is JADE 4.3.3 - revision 6726 of 2014/12/09 09:33:02
downloaded in Open Source, under LGPL restrictions,
at http://jade.tilab.com/
----------------------------------------
Jan 29, 2015 5:33:33 PM jade.imtp.leap.CommandDispatcher addICP
WARNING: Error adding ICP [email protected][Cannot bind server socket to localhost port 1099].
Jan 29, 2015 5:33:33 PM jade.core.AgentContainerImpl joinPlatform
SEVERE: Communication failure while joining agent platform: No ICP active
jade.core.IMTPException: No ICP active
\t at jade.imtp.leap.LEAPIMTPManager.initialize(LEAPIMTPManager.java:138)
\t at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:319)
\t at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:492)
\t at jade.core.Runtime.createMainContainer(Runtime.java:166)
\t at jade.Boot.main(Boot.java:89)
\t at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
\t at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
\t at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
\t at java.lang.reflect.Method.invoke(Unknown Source)
\t at main.JadeBootThread.run(JadeBootThread.java:33)
\t at main.Main.main(Main.java:7)
Jan 29, 2015 5:33:33 PM jade.core.Runtime$1 run
INFO: JADE is closing down now.
Я попытался возиться с закрытой финальной строкой GUI_args = "-gui"; Параметры и добавили «-local-порт 1111», но это дало ту же самую ошибку (порт ошибки также осталось 1099)
Спасибо, ваш ответ сэкономит мое время. Я забыл упомянуть пакеты агента класса –
Добро пожаловать! –