Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Hello! I am using the GSVideo library in my application to capture webcam input. Everything is ok and works perfectly from Eclipse. However, when I export the application into jar, I get the following error upon launching the jar:
GSVideo version: 1.0.0
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: can't loa
d library gio-2.0 (gio-2.0|libgio-2.0|libgio-2.0-0) with -Djna.library.path=\gst
reamer\windows32. Last error:java.lang.UnsatisfiedLinkError: Unable to load libr
ary 'gio-2.0': The specified module could not be found.
at codeanticode.gsvideo.GSLibraryLoader.loadLibrary(Unknown Source)
at codeanticode.gsvideo.GSLibraryLoader.load(Unknown Source)
at codeanticode.gsvideo.GSLibraryLoader.preLoadLibs(Unknown Source)
at codeanticode.gsvideo.GSLibraryLoader.getInstance(Unknown Source)
at codeanticode.gsvideo.GSVideo.initImpl(Unknown Source)
at codeanticode.gsvideo.GSVideo.init(Unknown Source)
at codeanticode.gsvideo.GSCapture.initGStreamer(Unknown Source)
at codeanticode.gsvideo.GSCapture.<init>(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Please know that I am aware of the strangeness of jar resource and dependencies management and have tried building the project with JarClassLoader implemented too without any luck. So there must be something else that Elipse does in order for the library to work. However, I was able to reproduce the error not only with the exported jar but inside Eclipse also. I have done it by removing the GSVideo jar from project libraries and using the source instead. There must be some dead-simple confusion with paths somewhere. However, I have tried to fix the problem by modifying the sources and was unable to do this because of the overwhelmingly complex structure for multiplatform load of the dlls.
Could you please provide ay hints to how can the problem be solved? Maybe I am doing something wrong?
In this case I'd recommend using the GSVideo.localGStreamerPath static variable to indicate a hard-coded location of the gstreamer libs.