Caprica Software

vlcj 3.x Tutorial

Prerequisites

Life is much simpler for you as an application developer if VLC is already installed on your own system (or your user target system).

It is possible to bundle up the VLC native libraries and the VLC plugins that you need and include them with your own application, but doing this is not as straightforward as you might think. If you're just starting out with vlcj, then just install VLC first.


VLC/LibVLC Versions

VLC 3.x supports the current 2.x release version of VLC. As much as possible, vlcj tries to be backwardly compatible with earlier versions of VLC.


Supported Platforms

You must match the CPU architecture of the Java Virtual Machine and the native LibVLC libraries - if you use a 32-bit JVM you must use a 32-bit release of VLC; if you use a 64-bit JVM you must use a 64-bit release of VLC. You can not mix CPU architectures, it will not work.

For all platforms, at least Java version 1.6 is required.

For Linux and Windows platforms, Java versions 1.7 and 1.8 are also fully supported.

On macOS, there are potentially critical limitations if you use any version of Java after the 1.6 version. This is because in Java 1.7 on macOS there is no longer any "heavyweight" window toolkit, everything is lightweight. This is a problem because VLC requires the window handle of a heavyweight window so it can be told where to render the video into. What this means in practice is that the EmbeddedMediaPlayerComponent will not work on any Java version later than 1.6 on macOS. All is not lost, but life is harder for you as an application developer, since you will need to use a DirectMediaPlayerComponent instead.

These tutorials start with the simpler EmbeddedMediaPlayerComponent.