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>