Loading...
Logo
Processing Forum
I am using eclipse and proclipsing for a project in processing 2.0. I select the "video" library when I set up the project, and then proceed to use very basic example code to play a movie. I can play the movie loop example perfectly well in the Processing app, but in eclipse get the following stack trace:

Copy code
  1. Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/jna/Platform
        at processing.video.LibraryPath.get(LibraryPath.java:43)
        at processing.video.Video.buildMacOSXPaths(Video.java:169)
        at processing.video.Video.initImpl(Video.java:108)
        at processing.video.Video.init(Video.java:69)
        at processing.video.Movie.initGStreamer(Movie.java:554)
        at processing.video.Movie.<init>(Movie.java:98)
        at luciusmhowfinal.LuciusMHOWFinal.setup(LuciusMHOWFinal.java:96)
        at processing.core.PApplet.handleDraw(PApplet.java:2241)
        at processing.opengl.PGL$PGLListener.display(PGL.java:3274)
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:576)
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561)
        at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899)
        at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
        at javax.media.opengl.Threading.invoke(Threading.java:193)
        at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
        at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:537)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
        at sun.awt.RepaintArea.paint(RepaintArea.java:241)
        at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
        at java.awt.Component.dispatchEventImpl(Component.java:4852)
        at java.awt.Component.dispatchEvent(Component.java:4604)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
        at java.awt.EventQueue.access$400(EventQueue.java:82)
        at java.awt.EventQueue$2.run(EventQueue.java:676)
        at java.awt.EventQueue$2.run(EventQueue.java:674)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:690)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.ClassNotFoundException: com.sun.jna.Platform
        at 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)
        ... 41 more
    Already called beginDraw()
    Exception in thread "Animation Thread" java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/jna/Platform
        at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
        at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:100)
        at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205)
        at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
        at javax.media.opengl.Threading.invoke(Threading.java:191)
        at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
        at processing.opengl.PGL.requestDraw(PGL.java:1201)
        at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1604)
        at processing.core.PApplet.run(PApplet.java:2140)
        at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.NoClassDefFoundError: com/sun/jna/Platform
        at processing.video.LibraryPath.get(LibraryPath.java:43)
        at processing.video.Video.buildMacOSXPaths(Video.java:169)
        at processing.video.Video.initImpl(Video.java:108)
        at processing.video.Video.init(Video.java:69)
        at processing.video.Movie.initGStreamer(Movie.java:554)
        at processing.video.Movie.<init>(Movie.java:98)
        at luciusmhowfinal.LuciusMHOWFinal.setup(LuciusMHOWFinal.java:96)
        at processing.core.PApplet.handleDraw(PApplet.java:2241)
        at processing.opengl.PGL$PGLListener.display(PGL.java:3274)
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:576)
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561)
        at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899)
        at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
        at java.awt.EventQueue.access$400(EventQueue.java:82)
        at java.awt.EventQueue$2.run(EventQueue.java:676)
        at java.awt.EventQueue$2.run(EventQueue.java:674)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/jna/Platform
        at processing.video.LibraryPath.get(LibraryPath.java:43)
        at processing.video.Video.buildMacOSXPaths(Video.java:169)
        at processing.video.Video.initImpl(Video.java:108)
        at processing.video.Video.init(Video.java:69)
        at processing.video.Movie.initGStreamer(Movie.java:554)
        at processing.video.Movie.<init>(Movie.java:98)
        at luciusmhowfinal.LuciusMHOWFinal.setup(LuciusMHOWFinal.java:96)
        at processing.core.PApplet.handleDraw(PApplet.java:2241)
        at processing.opengl.PGL$PGLListener.display(PGL.java:3274)
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:576)
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561)
        at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899)
        at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
        at javax.media.opengl.Threading.invoke(Threading.java:193)
        at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
        at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:537)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
        at sun.awt.RepaintArea.paint(RepaintArea.java:241)
        at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
        at java.awt.Component.dispatchEventImpl(Component.java:4852)
        at java.awt.Component.dispatchEvent(Component.java:4604)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
        at java.awt.EventQueue.access$400(EventQueue.java:82)
        at java.awt.EventQueue$2.run(EventQueue.java:676)
        at java.awt.EventQueue$2.run(EventQueue.java:674)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:690)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Neither running the app in 32 bit mode, nor importing the GStreamer library independently, fixes things. If anyone can help, I would very much appreciate it. I had assumed movie playback would be straightforward as it is in Processing 1.5, and this is driving me crazy!

Replies(4)

Are you using Java 7? I believe most com.sun packages have been removed from this version.
I am. I'll see if that's the issue. Thanks!
Just tried using 1.5.0 and 1.4.2, both in 32 bit mode, and neither worked. Confirmed it was using a different JVM from the console. Same error.

Any further ideas?
No need to go back that far! Processing needs at least Java 6, I think. And take care to use Oracle's Java (ex-Sun's Java), as OpenJDK has probably not these private APIs.