I face a big trouble at the end of my development. My assumptions went wrong.
My requirement is 'Run VLCJ without installing VLC player locally'.
After spending time to understand VLCJ API, I came to know that It must be possible. So I created a custom native-lib.jar with following dlls.
libvlccore.dll
libvlc.dll
/plugins/.... (This contains every plugins)
I load the library using :
System.loadLibrary("libvlccore");
System.loadLibrary("libvlc");
For my development environment, I dynamically set java.library.path to a directory which extracts the content of my custome native-lib.jar. This works fine. Finally, end users of this application use JNLP in order to launch this application.I was sure <nativelib download="eager" href="lib/native-lib.jar"/> will loads vlcj lib to java.library.path. Yes it does. But the big mess is VLCJ API could not load /plugin from native-lib.jar. It says :
In the text below <libvlc-path> represents the name of the directory containing "libvlc.dll" and "libvlccore.dll" and <plugins-path> represents the name of the directory containing the vlc plugins...
For libvlc to function correctly the vlc plugins must be available, there are a number of different ways to achieve this:
1. Make sure the plugins are installed in the "<libvlc-path>/plugins" directory, this should be the case with a normal vlc installation.
2. If using vlc 1.2.x, include System.setProperty("VLC_PLUGIN_PATH", "<plugins-path>"); at the start of your application code.
3. If using vlc 1.2.x, specify -DVLC_PLUGIN_PATH=<plugins-path> on the command-line when starting your application.
4. If using vlc 1.1.x, pass "--plugin-path=<plugins-path>" as parameters in your application code when you create a MediaPlayerFactor
Means /plugins not loaded. How can we set plugin directory dynamically? If i set the --plugin-path parameter as a absolutel path ,which means that i put all the plugin dll files at the client side, everthing is ok. But this is not what I wanted to achieve. I should be able to supply plugins from a native jar. If I could load "libvlc.dll" and "libvlccore.dll" successfully at run time. There must be a way to load /plugins as well.
I expect your prompt reply as I am in big trouble.