If I run:
java -jar myjar.jar
I get:
java.lang.NoClassDefFoundError: org/apache/commons/math3/stat/regression/OLSMultipleLinearRegression
However, if I run:
java -classpath '.:commons-math3-3.2.jar' -jar myjar.jar
I get:
java.lang.NoClassDefFoundError: org/apache/commons/math3/special/Erf
Any idea why this happened?
I just don't compute how the -classpath
option can solve the "Class Not Found" error for one class but not for the other, when both classes do exist in the .jar added.
Or did I invoke the .jar incorrectly?