vlcj-2.0.0 launch Errors in Windows

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
rshetty00
Blank Cone
Blank Cone
Posts: 34
Joined: 23 Feb 2012 03:49

vlcj-2.0.0 launch Errors in Windows

Postby rshetty00 » 13 Mar 2012 22:14

Appreciate HELP!!!

Env: Windows 7, vlc=2.1 mar 6 snapshot (works), latest vlcj-2.0.0 distribution.

Did exactly as in video vlcj-speed.run.flv. Eclipse Builds but gives error: "could not find main in classes..." Tried several things (adding external jar etc) and switched to commandline and executing from project directory.
Note: Native libs are copied to c:\vlcj (to get around doubts on path should have "" or not) from full installation. Specifying that path -Djna.library.path=C:\Program Files (x86)\VideoLAN\VLC did not help.


C:\eclipse\workspace\demo1>java -Dvlcj.log=DEBUG -Djna.library.path=C:\vlcj -classpath C:\vlcj\jna-3.4.0.jar;C:\vlcj\platform-3.4.0.jar;C:\vlcj\vlcj-2.0.0.jar;C:\eclipse\workspace\demo1\bin test.Demo \Users\rshetty\Desktop\mediaClip_480_5sec_6mbps_h264.mp4


Error:

vlcj: (Info.java:66) | INFO | vlcj: 2.0.0
vlcj: (Info.java:67) | INFO | java: 1.7.0_02 Oracle Corporation
vlcj: (Info.java:68) | INFO | java home: C:\Program Files\Java\jre7
vlcj: (Info.java:69) | INFO | os: Windows 7 6.1 amd64

vlcj: (LibVlcFactory.java:168) | ERROR | Failed to load native library
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Failed to load the native library.

The error was "Unable to load library 'libvlc': The specified module could not be found.
".

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

In the text below <libvlc-path> 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 librari
es:
1. Include NativeLibrary.addSearchPath("libvlc", "<libvlc-path>"); at the start
of your application code.
2. Include System.setProperty("jna.library.path", "<libvlc-path>"); at the star
t of your application code.
3. Specify -Djna.library.path=<libvlc-path> on the command-line when starting y
our application.
4. Add <libvlc-path> 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.<init>(MediaPlayerFactory.java:168)
at uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent.onGetMediaPlayerFactory(EmbeddedMediaPlayerComponent.java:250)
at uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent.<init>(EmbeddedMediaPlayerComponent.java:160)
at test.Demo.<init>(Demo.java:36)
at test.Demo$1.run(Demo.java:25)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Note: Demo1\.classpath (I believe commandline overrides this)

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="lib" path="lib/vlcj-2.0.0.jar"/>
<classpathentry kind="lib" path="lib/jna-3.4.0.jar"/>
<classpathentry kind="lib" path="lib/platform-3.4.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

rshetty00
Blank Cone
Blank Cone
Posts: 34
Joined: 23 Feb 2012 03:49

Re: vlcj-2.0.0 launch Errors in Windows

Postby rshetty00 » 13 Mar 2012 23:17

Just in case: Both VLC and JDK 64 bit in windows 7 64 bit

rshetty00
Blank Cone
Blank Cone
Posts: 34
Joined: 23 Feb 2012 03:49

Re: vlcj-2.0.0 launch Errors in Windows

Postby rshetty00 » 14 Mar 2012 01:16

Resolved most of it myself finally!... The combination of VLC Install/Uninstallation issues (multiple copies lingering around even after a clean "go" from VLC uninstall etc) and conflicts of 64 bit JDK and VLC seems to be major part of it. MRL needs disk name unlike linux. Experimented bit with HLS, sevral URLs etc. Fine.

Would be nice to have the Player controls enabled in this demo!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 60 guests