MiaoRong / javacv

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

The example doesn't work after following proper steps. #186

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.installed java and net beans(both works fine for  simple java programs)
2. installed Microsoft Visual C++ 2010 Redistributable Package (x86)
3. Extracted  OpenCV-2.3.1-win-superpack.exe inside the root directory C:\
4. create a new project and added all jars(javacpp.jar, javacv.jar, and 
javacv-*.jar)
5. created smoother.java and main.java, then called smoother from the main 
class.
6. compiled it.it gives an following error:-

-----------------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: 
com/googlecode/javacpp/Pointer
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        at opencv.Main.main(Main.java:21)
Caused by: java.lang.ClassNotFoundException: com.googlecode.javacpp.Pointer
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        ... 15 more
--------------------------------------------------------------------

What is the expected output? What do you see instead?
It should work fine

What version of the product are you using? On what operating system?
windows 7 

Please provide any additional information below.

Original issue reported on code.google.com by i.vishal...@gmail.com on 15 Apr 2012 at 10:54

GoogleCodeExporter commented 9 years ago
It looks like JavaCPP is not actually in your classpath. Can you check if it 
also happens when running "java -cp javacv.jar ..." from the command line? 
thanks

Original comment by samuel.a...@gmail.com on 22 Apr 2012 at 3:28

GoogleCodeExporter commented 9 years ago
Thanks a lot samuel. Looks like that was the problem.And now its working fine.
Thanks and Regards
Vishal

Original comment by i.vishal...@gmail.com on 24 Apr 2012 at 7:39

GoogleCodeExporter commented 9 years ago
Great! Please ask your questions on the mailing list next time if possible, 
thank you

Original comment by samuel.a...@gmail.com on 12 May 2012 at 11:55