jloyd / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Problem with jar file running openCV functioins #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a simple GUI program that does the cvSmooth operation using hardcoded 
input and output file paths.  I'm using Eclipse Helio on a Win7 PC.  The 
program runs fine in the IDE but when I create a JAR file and attempt to run it 
on the same computer it puts up the GUI OK but when I press the button to do 
the smooth operation I get the following error:

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/googl
ecode/javacv/cpp/opencv_core$CvArr

I think the JAR run isn't finding the opencv wrapper classes, but I can't find 
a way to fix this.  Apparently adding them as "External Jars" in the project 
library properties isn't enough?

I have verified the opencv (ver. 2.2) dll's are on the system path.

Original issue reported on code.google.com by dlflannery8529@gmail.com on 3 Mar 2011 at 3:12

GoogleCodeExporter commented 9 years ago
Please kill this issue -- I fixed the problem, which was my error in exporting 
the JAR.  I needed to export a RUNNABLE JAR file and select "Package required 
libraries into generated JAR".  Sorry, I'm just learning Java and Eclipse.

Thanks for this great OpenCV wrapper!

Original comment by dlflannery8529@gmail.com on 3 Mar 2011 at 3:41

GoogleCodeExporter commented 9 years ago
Yes, and you should not post issues regarding Eclipse here. It seems you can do 
that with the "Runnable JAR File" export wizard, which is not documented, but 
does what you want I think:
http://stackoverflow.com/questions/502960/eclipse-how-to-build-an-executable-jar
-with-external-jar

Ok, glad to see you figured it out.

Original comment by samuel.a...@gmail.com on 3 Mar 2011 at 3:49