Using VLC in Java programs under Windows XP ------------------------------------------- Document : JVLC bindings under Windows XP Version : 20060722 Initial version Purpose ======= This document explains you the steps you need to follow to get the Java bindings of VLC working under Windows XP. Requirements ============ 1. You need to download the port of JVLC for Windows XP. The lastest version is jvlc-win32-060612.zip. TODO: add new location ( previous http://jvlc.ihack.it ) Unzip jvlc-win32-060612.zip in a directory of your choice. (C:\jvlc-win32-060612 is a good choice) This directory will be refered to as JVLC_HOME. 2. You need a Java Runtime Environment as you will run a Java application. Here is a link to get the Sun JVM. http://www.java.com/en/download/index.jsp After installing one of the lastest version. We use Version 5.0 Update 6 in this example. We refer the directory of installation as JAVA_HOME. (C:\Program Files\Java\jre1.5.0_06) This should run well with latest version ( Version 5.0 Update 7). 3. You need 2 files to display called a.avi and a.mp3. Theses to files need to be saved in the JVLC_HOME directory. Running examples ================ Open a console Start > Execute : Open [ cmd.exe ] You must set current PATH variable to point to the correct location of Java Runtime Environment and JVLC jvlc.dll. In the console, type : C:> echo %PATH% If non empty, this should display a set of semi-colon separated directories. Now, you can add path to jvlc.dll file. Type : C:> set PATH=\path\to\jvlc\directory;%PATH% (do not forget both '%') Please replace \path\to\jvlc\directory with the location where jvlc-win32-060612.zip file. (C:\jvlc-win32-060612\ in our example i.e. JVLC_HOME) Now, you can add path to jre's java executable. Type : C:> set PATH=\path\to\jre\bin:%PATH% Please replace \path\to\jre\bin with the location where JRE is installed. (C:\Program Files\Java\jre1.5.0_06\bin i.e JAVA_HOME\bin). Do not forget to add \bin at the end ! Your path is now set correctly. You can check that the two directories have been added by typing : C:> echo %PATH% In the console, you can check if java is correctly installed. C:>java.exe -version This should display something like : java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) Now you can run the example. Go to the JVLC_HOME directory. Type : C:> cd C:\path\to\jvlc\ ( i.e. cd C:\jvlc-win32-060612) C:\path\to\jvlc\> java -cp . SwingClient This should run a Java application with a window consisting of an area for video display, a place to set video location and 4 buttons 'Set item", "FullScreen", "Play/Pause" and "Stop". TODO: make it verbose by default ( add "-vvv" option in JVLC.java ) I get the following ouput in verbose mode : param: [00000026] main interface error: no interface module matched "hotkeys,none" [00000026] main interface error: no suitable interface module [00000001] main vlc error: interface "hotkeys,none" initialization failed You can test a second example : C:\path\to\jvlc\> java -cp VLCExample This is a non graphical example. FAQ === 1. I get the following error ? +--------------------------------------------------------------------------+ | Java.exe - Composant introuvable | +--------------------------------------------------------------------------+ | Cette application n'a pas pu démarrer car jawt.dll est introuvable. | | La réinstallation de cette application peut corriger ce problème. | | [ Ok ] | +--------------------------------------------------------------------------+ Make sure that you are running java.exe from jre installation. It does not work currently if java.exe is jdk's java.exe.