Deprecated: Function create_function() is deprecated in /home/bluekitc/public_html/ringwald.ch/libxine-java/pmwiki.php on line 456

Deprecated: Function create_function() is deprecated in /home/bluekitc/public_html/ringwald.ch/libxine-java/pmwiki.php on line 456

Deprecated: Function create_function() is deprecated in /home/bluekitc/public_html/ringwald.ch/libxine-java/pmwiki.php on line 456

Deprecated: Function create_function() is deprecated in /home/bluekitc/public_html/ringwald.ch/libxine-java/pmwiki.php on line 456

Deprecated: Function create_function() is deprecated in /home/bluekitc/public_html/ringwald.ch/libxine-java/pmwiki.php on line 456

Deprecated: Function create_function() is deprecated in /home/bluekitc/public_html/ringwald.ch/libxine-java/pmwiki.php on line 456
libxine-java - Java binding for the xine multimedia library | Main / BinaryDistribution

From libxine-java - Java binding for the xine multimedia library

Main: BinaryDistribution

Binary Distribution of Java Apps and Libs which Include Native Libraries... Or How to Package libxine-java?


Loading native libraries in Java

Although any kind of file, and especially native libraries, can be stored in JARs, native libraries cannot be loaded from there by the system dynamic loader.

In Java, there are three ways in which native libs can be found and loaded:

Similar to these options, various projects use different strategies to load their libraries:

JNI and dependent libraries

If a native library is loaded by its absolute path, a problem arises when it is linked against other libraries that are not in the system search path. On Windows, the folder of the native library is automatically added to the search path for dependent libraries. There, if all native libraries are in the same folder, the runtime loader can find and load all libraries correctly. On Linux and Mac OS X, however, extra care has to be taken to allow for dependent libraries that are placed in the same folder as the native library. Let's assume we have a Java library A.jar which loads native library foo, which itself depends on library bar.

An example project with a dummy library that searches for its JAR in the classpath to find its native libraries automatically is here.

What should be in the package?

In addition to the native libraries provided by libxine-java, to actually use libxine-java, the xine-lib and related libs such as libdvdread and libdvdcss are required. If these libraries should be included in a future libxine-java package depends on the deployment platform:

How to build all the required libraries?

Building all the dependent libraries manually would be a tedious task. With a bit of luck, the efforts of the VideoLan team to automatically build all libraries can be directly harvested. xine and vlc most likely share most of their dependent libraries. Have a look at the very helpful/detailed GIT changelog for extras/contrib and the binary contrib packages for OS X Intel/PPC and Win32.

Software distribution

Finally, I've taken a look at the way Java apps are provided by different projects. It looks like there is a common agreement over the best way to deploy a Java application for a particular platform:

Will it work on the web?

In addition to these, Java Web Start allows to store all JARs and other resources, including native libraries, on a web server, and just specify the corresponding URLs in a JNLP XML file.

The libxine-java plan

For libxine-java, I'll try to provide a single folder which contains a JAR and all required libs (including xine-lib). libxine-java should use the Self Inspection to check the classpath and load all required libraries from the folder. By this, all distribution scenarios are fine. If xine-lib (with the one hundred plug-ins) can be provided by Java Web Start is not clear to me yet.

Retrieved from http://libxine-java.ringwald.ch/index.php?n=Main.BinaryDistribution
Page last modified on November 23, 2008, at 06:22 PM