Howdy,
I'm trying to use one of the Apache Commons libraries (Math 3.3) in Java with Eclipse. (JDK 1.7 and Eclipse 3/JDT 3.7) And I can't get away from NoClassDefFoundError and ClassNotFoundException exceptions.
I have the appropriate import statements in the code, the project builds without errors or warnings, but I get an exception at runtime.
What I've tried:
I've added a lib folder to my project, put commons-math3-3.3.jar and commons-math3-3.3-javadoc.jar in there, and added the library to the build path.
I've created a new project in Eclipse, put the jar files in that project, and added that to the build path.
I've put the jar files in a new folder, added that folder to the PATH and CLASSPATH, and added that to the build path as an external library.
I've added a user defined library in Eclipse preferences and added that library to the build path. (Following this post:
http://www.java-forums.org/new-java/106 ... #post69802 )
The exception message:
Line 623:
I am no Java expert, but I've used external libraries in the past, e.g. the Java Media Framework.
Any ideas what I am missing?
Thanks.
I'm trying to use one of the Apache Commons libraries (Math 3.3) in Java with Eclipse. (JDK 1.7 and Eclipse 3/JDT 3.7) And I can't get away from NoClassDefFoundError and ClassNotFoundException exceptions.
I have the appropriate import statements in the code, the project builds without errors or warnings, but I get an exception at runtime.
What I've tried:
I've added a lib folder to my project, put commons-math3-3.3.jar and commons-math3-3.3-javadoc.jar in there, and added the library to the build path.
I've created a new project in Eclipse, put the jar files in that project, and added that to the build path.
I've put the jar files in a new folder, added that folder to the PATH and CLASSPATH, and added that to the build path as an external library.
I've added a user defined library in Eclipse preferences and added that library to the build path. (Following this post:
http://www.java-forums.org/new-java/106 ... #post69802 )
The exception message:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/math3/transform/FastCosineTransformer
at Main.performDCT(Main.java:623)
at Main.filterACF_DCT(Main.java:244)
at Main.main(Main.java:148)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.math3.transform.FastCosineTransformer
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)
... 3 more
at Main.performDCT(Main.java:623)
at Main.filterACF_DCT(Main.java:244)
at Main.main(Main.java:148)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.math3.transform.FastCosineTransformer
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)
... 3 more
Line 623:
Code:
FastCosineTransformer transformer = new FastCosineTransformer(DctNormalization.STANDARD_DCT_I);
I am no Java expert, but I've used external libraries in the past, e.g. the Java Media Framework.
Any ideas what I am missing?
Thanks.