I copied the apache Math 3.3 jar library into my intellij project folder and then added it to my project via the "Add to Library" option.
While everything compiles and builds fine, when I run my project's jar, I get NoClassDefFoundError for the classes I import from the apache math library.
Any solutions?
Thanks
Edit:
Below is the error I get
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/math3/stat/descriptive/rank/Percentile
at Main.main(Main.java:80)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.math3.stat.descriptive.rank.Percentile
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 1 more
The screenshot of the Modules dialog box is here: https://i.stack.imgur.com/HaRx9.jpg
Edit 2: I installed the apache jar using "Add to Library" and then choosing the "classes" option.
Edit 3: To make the jar, I go to Build -> Build Artifacts -> Build.