I'm currently developing a project that needs a json creator class in java. I am trying to use the json-simple library, and have already downloaded and copied the .jar file to my projects directory. I am compiling my java file using
javac -cp json-simple.jar report.java
however when i try to run it i get this error message:
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/simple/JSONObject
at report.main(report.java:22)
Caused by: java.lang.ClassNotFoundException: org.json.simple.JSONObject
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 1 more
I am using ubuntu and cannot use an IDE like eclipse, can anyone help me? thank you in advance.