http://doora.qiniudn.com/cVWnQ.bz2
build command :
javac test.java TrilaterationTest.java NonLinearLeastSquaresSolver.java
LinearLeastSquaresSolver.java TrilaterationFunction.java -classpath
commons-math3-3.6.1.jar:junit-4.12.jar
有編譯出多個 class , test.java 是我main 進入點所以我執行它
java test // 出現下面的 Exception
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/math3/fitting/leastsquares/LeastSquaresOptimizer
at test.main(test.java:11)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.math3.fitting.leastsquares.LeastSquaresOptimizer
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
或是改成下面這樣好像也不行
java -jar commons-math3-3.6.1.jar test
commons-math3-3.6.1.jar 中沒有主要資訊清單屬性
請問這是什麼原因?
謝謝