Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Using the Video library on IntelliJ - NoClassDefFoundError

$
0
0
Hi guys,

I'm developing a Processing sketch with IntelliJ IDEA. I love this IDE and I really recommend it, but for some reason my sketch works fine in the Processing IDE, but I get a NoClassDefFoundError in IntelliJ when I use the Capture class. Any ideas? 

Here's the code:

  1. import processing.core.PApplet;
  2. import processing.core.PImage;
  3. import processing.video.Capture;

  4. public class coketruck extends PApplet{
  5.     Capture cam;
  6.     PImage cocacola;
  7.     boolean activate = false;
  8.     public void setup(){
  9.         size(900,600);
  10.         cocacola = loadImage("cokelogo.JPG");
  11.         String[] cameras = Capture.list();
  12.         cam= new Capture(this, cameras[0]);
  13.     }
  14.     public void draw(){
  15.         if(activate == false){
  16.             image(cocacola,0,0,width,height);
  17.             println("woah");
  18.         }
  19.         else{
  20.             if (cam.available() == true) {
  21.                 cam.read();
  22.             }
  23.             image(cam, 0,0,width,height);
  24.         }
  25.     }
  26.     public void mouseClicked(){
  27.         println("hello");
  28.         activate = true;
  29.         cam.start();
  30.     }

  31. }
And the error message is the following:

  1. Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: org/gstreamer/elements/BufferDataAppSink$Listener
  2. at coketruck.setup(coketruck.java:12)
  3. at processing.core.PApplet.handleDraw(PApplet.java:2241)
  4. at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
  5. at processing.core.PApplet.run(PApplet.java:2140)
  6. at java.lang.Thread.run(Thread.java:680)
  7. Caused by: java.lang.ClassNotFoundException: org.gstreamer.elements.BufferDataAppSink$Listener
  8. at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
  9. at java.security.AccessController.doPrivileged(Native Method)
  10. at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
  11. at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  12. at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
  13. at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  14. ... 5 more

Viewing all articles
Browse latest Browse all 1768

Trending Articles