jason-lang / jason

Jason is a fully-fledged interpreter for an extended version of AgentSpeak, a BDI agent-oriented logic programming language.
http://jason-lang.github.io
GNU Lesser General Public License v3.0
217 stars 67 forks source link

Not able to only use the Jason BDI engine #101

Closed albertonr7 closed 1 year ago

albertonr7 commented 1 year ago

Following the demo "Using-only-jason-BDI-engine", I have some issues. In the step 2 of the README, when I try to run the code, the next exception is generated:

java -cp ../../libs/jason-3.1.jar:. SimpleJasonAgent Exception in thread "main" java.lang.NoClassDefFoundError: javax/json/JsonValue at jason.stdlib.succeed_goal.<clinit>(succeed_goal.java:89) at jason.asSemantics.TransitionSystem.<init>(TransitionSystem.java:500) at SimpleJasonAgent.<init>(SimpleJasonAgent.java:34) at SimpleJasonAgent.main(SimpleJasonAgent.java:26) Caused by: java.lang.ClassNotFoundException: javax.json.JsonValue at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 4 more

I'm using openjdk 17.0.6

jomifred commented 1 year ago

Hi, thanks for reporting this bug.

Jason now uses other libraries that must be in the class path. Assuming you have JASON_HOME configured, you can run with

java -classpath "$JASON_HOME/libs/*:." SimpleJasonAgent