library dev + eclipse + NoClassDefFoundError
in
Library and Tool Development
•
4 months ago
Hello -
I'm developing my first processing library and simultaneously learning Eclipse. Before developing the library the code, and included libraries all worked as referenced classes stored as separate files in the processing IDE. Converting those referenced files to libraries because they need to more widely used.
The library itself references an external library which causes a java.lang.NoClassDefFoundError when referenced during runtime. There are no compilation issues. This is the error when I run a sketch referencing my library (which references the included library) from the processing IDE (for some reason when run from Eclipse it still seems to get the error, but doesn't report it to the Console). [sketch is HeartCircle, my lib is heartstuff.HeartStream, missing lib included in HeartStream is jtransforms.fft.FloatFFT_1D]
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: edu/emory/mathcs/jtransforms/fft/FloatFFT_1Dat heartstuff.HeartStream.getDominantFreq(Unknown Source)at HeartCircle.draw(HeartCircle.java:200)at processing.core.PApplet.handleDraw(PApplet.java:1631)at processing.core.PApplet.run(PApplet.java:1530)at java.lang.Thread.run(Thread.java:680)Caused by: java.lang.ClassNotFoundException: edu.emory.mathcs.jtransforms.fft.FloatFFT_1Dat java.net.URLClassLoader$1.run(URLClassLoader.java:202)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java:190)at java.lang.ClassLoader.loadClass(ClassLoader.java:306)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)at java.lang.ClassLoader.loadClass(ClassLoader.java:247)... 5 more
I've tweaked every reference to classpath I could find in Eclipse GUI (preferences for library and sketch), and the build.properties file for the sketch and my problem library seems to consistently be there.
I have a feeling I'm missing something simple in Eclipse settings or the ANT configuration but not sure what. Please let me know what more info I can provide.
Eclipse Juno sp2
Processing 1.5.1
1