caprica/vlcj — Issue #22: I am using the latest jar in Windows 7 home edition, but fails.
Author: vlcjava
Created: 2012-03-07 13:29:44+00:00
State: open

I tested this in my Linux box and it works. But when i run it in Windows its not working. How can i fix it?

run:
_ _
__ _| | ___ (_)
\ \ / / |/ __|| |
\ V /| | (__ | |
\_/ |_|\___|/ | 2.0.0
|__/ www.capricasoftware.co.uk

VLCJ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

VLCJ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with VLCJ. If not, see .

Copyright 2009, 2010, 2011, 2012 Caprica Software Limited.

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Failed to load the native library.

The error was "Unable to load library 'libvlc': Kan opgegeven module niet vinden.
".

The required native libraries are named "libvlc.dll" and "libvlccore.dll".

In the text below represents the name of the directory containing "libvlc.dll" and "libvlccore.dll"...

There are a number of different ways to specify where to find the native libraries:
1. Include NativeLibrary.addSearchPath("libvlc", ""); at the start of your application code.
2. Include System.setProperty("jna.library.path", ""); at the start of your application code.
3. Specify -Djna.library.path= on the command-line when starting your application.
4. Add to the system search path (and reboot).

If this still does not work, then it may be necessary to explicitly add the native library directory to the operating
system configuration - e.g. on Linux this might mean setting the LD_LIBRARY_PATH environment variable, or adding
configuration to the "/etc/ld.so.conf" file or the "/etc/ld.so.conf.d" directory. Of these options, setting
LD_LIBRARY_PATH is the only one that would not require root privileges.

Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to load
32-bit native libraries.

More information may be available in the log, specify -Dvlcj.log=DEBUG on the command-line when starting your application.

at uk.co.caprica.vlcj.binding.LibVlcFactory.create(LibVlcFactory.java:170)
at uk.co.caprica.vlcj.player.MediaPlayerFactory.(MediaPlayerFactory.java:168)
at javaapplication1.MediaPlayer.(MediaPlayer.java:59)
at javaapplication1.MediaPlayer$1.run(MediaPlayer.java:41)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
BUILD STOPPED (total time: 25 seconds)