Caprica Software

vlcj 4.x Tutorial

Starter Projects

You can use Yeoman to easily and quickly create a vlcj starter project.

The generated project will create a working media player application that can immediately be built with Maven.

Using Yeoman to generate a vlcj starter project is of course completely optional.


Installing Yeoman

Yeoman is NodeJS application that uses "generators" to create a project based on various templates.

A generator for vlcj projects is available in the NPM public repository.

Assuming you have npm from NodeJS already installed, you can install Yeoman and the vlcj generator like this:

npm install -g yo
npm install -g generator-vlcj

Using Yeoman

Once you have Yeoman and the vlcj generator installed, creating a new project is very easy.

First, make a new directory for your project, then invoke Yeoman:

mkdir my-cool-project
cd my-cool-project
yo vlcj

Executing the yo vlcj command will being an interactive process, answer the questions to tailor the project how you want it:

After answering the short list of questions, your new project will be generated in the current directory.


Building the Project

The resultant project will have a Maven pom.xml, and a main class implementing a minimal media player. The code in this main class will be very similar to the code shown in these tutorials.

You can use the Maven mvn command to build it:

mvn package

You can also import this as a new project into most integrated development environments.