# vlcj - Environment Setup

vlcj is a Java based library, so the very first requirement is to have JDK installed on your machine.

## Step 1 - Setup Java Development Kit (JDK)

You can download the latest version of SDK from Oracle's Java site − Java SE Downloads. You will find instructions for installing JDK in downloaded files, follow the given instructions to install and configure the setup. Finally set PATH and JAVA_HOME environment variables to refer to the directory that contains java and javac, typically java_install_dir/bin and java_install_dir respectively.

If you are running Windows and have installed the JDK in C:\jdk1.6.0_15, you would have to put the following line in your C:\autoexec.bat file.

set PATH=C:\jdk1.6.0_15\bin;%PATH%
set JAVA_HOME=C:\jdk1.6.0_15


Alternatively, on Windows NT/2000/XP, you will have to right-click on My Computer, select Properties → Advanced → Environment Variables. Then, you will have to update the PATH value and click the OK button.

On Unix (Solaris, Linux, etc.), if the SDK is installed in /usr/local/jdk1.6.0_15 and you use the C shell, you will have to put the following into your .cshrc file.



## Step 4 - Create a Maven Project

C:\MVN>mvn archetype:generate
-DgroupId = com.tutorialspoint.media
-DartifactId = mediaPlayer
-DarchetypeArtifactId = maven-archetype-quickstart
-DinteractiveMode = false


It will create a maven project. Now update the pom.xml file as follows −

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.tutorialspoint.media</groupId>
<artifactId>mediaPlayer</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>mediaPlayer</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>uk.co.caprica</groupId>
<artifactId>vlcj</artifactId>
<version>4.4.4</version>
</dependency>
</dependencies>
</project>


Run the follwing command to update maven dependencies and build project.

mvn package


Once command is successful. Import the maven based mediaplayer project in Eclipse as a maven project. Rest Eclipse will handle.