Page 1 of 1

JVLC - all inside one jar

Posted: 03 Apr 2009 14:42
by quorthon
hello

We plan to develop a java-player using jvlc for video-streaming. Is it possible to build a unique "vlcplayer.jar" which can run under different operating systems, e.g. linux and windows where no vlc is installed? Or do we have to install, register the vlc-player?

I've tried the following on a windows xp with no vlc installed:
- lib-folder -> jna.jar, jvlc-core.jar
- libvlc.dll
- libvlccore.dll
- vlcplayer.jar (my own jvlc java player)

java -jar vlcplayer.jar -> it works!

But I know there are different dll's necessarily e.g. for Linux and Windows, so is there a way to put this dll's and jar's into one global jar to get this works without installing anything on different OS?

Kind regards,
Peter

Re: JVLC - all inside one jar

Posted: 03 Apr 2009 16:29
by jon20usa
There is no way to do this. Windows cannot use libraries inside JAR's. Sadly there does not appear to be a way to wrap up the entire package in one JAR (and use libraries from within that at least not without extracting the libraries first). If you search for JAR class loader, you can find a few different things that try to get around this, but I thought they were too clumsy and not worth it. In the end, I left the dll's and JAR in the same folder and zipped it up.

If somehow you do find a way, please let me know.