How can I configure GSVideo to work with IDEA

I'm trying to take some code that was written in the Processing environment and make it work directly through IDEA.

I've been reasonably successful until I tried working with Movies.   The underlying issue seems to be that at run time,  a dynamic library (gstreamer) can't be found. The specific name of that library is libgstreamer-0.10.dylib and I have tried numerous ways to configure the proect to find it  (adding to the library, using -Djava.library.path and so forth) but somehow it still won't load.

Wondering if there's another step I need?

Thanks

7 comments
Comment actions Permalink

Make sure this native library and all its depedencies are in the system PATH.

0
Comment actions Permalink

Thanks --- I'll try that for the short term --- however, I note that when one runs Processing, this stuff all works and those libraries are NOT in the system path.

So clearly Processing is doing something when it starts so as to be able to find these libraries. I'd like to try and emulate that.

0
Comment actions Permalink

Processing may set the working directory differently so that these libraries are found there. You can see if it's the case by changing the working directory in IDEA Application run/debug configuration to match the working directory of the app when it's run from Processing.

-Djava.library.path listing the folders with the native libraries added to the VM Options of the run/debug configuration will also work.

0
Comment actions Permalink

The -Djava.library.path was the first thing I tried but I was unable to get that to work at all.....I suspect there's something more going on.

0
Comment actions Permalink

I added code to print all the properties and as you can see (highlighted), the path to the location of the library is in the list

/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java -Djava.library.path=/Volumes/External1/OwnCloud/SUNY/Courses/Processing/gluegen-rt-natives-macosx-universal.jar:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/jogl-all-natives-macosx-universal.jar "-Djava.security.policy=/Applications/IntelliJ IDEA 14.app/Contents/bin/appletviewer.policy" -Djava.library.path=/Volumes/External1/OwnCloud/SUNY/Courses/Processing/GSVideo-1.0.0-macosx/GSVideo/library/gstreamer/macosx64/ -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/collageDJJM/application.macosx64/source/out/production/Collage:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/gluegen-rt.jar:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/jogl-all.jar:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/core.jar:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/GSVideo-1.0.0-macosx/GSVideo/library/gstreamer-java.jar:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/GSVideo-1.0.0-macosx/GSVideo/library/GSVideo.jar:/Volumes/External1/OwnCloud/SUNY/Courses/Processing/GSVideo-1.0.0-macosx/GSVideo/library/jna.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain sun.applet.AppletViewer file:/private/var/folders/n2/9h010cts31sc8_n4yd1z__kh0000gn/T/AppletPage0.html
java.vendor: Oracle Corporation

0
Comment actions Permalink

The library that is loaded may depend on some other native library that is not in PATH. Note that on Mac PATH is not the same for Terminal and GUI apps.

0
Comment actions Permalink

That was it. Thanks so much.  I just threw the entire folder into the JetBrains library section and now it works.

what a damn great tool!!

D

0

Please sign in to leave a comment.