caprica/vlcj-javafx-demo

Can't run on mac.

Closed this issue · 8 comments

image


Exception in Application constructor
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
	at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Unable to construct Application instance: class AnimationTimerJavaFXDirectRenderingTest
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:907)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$159(LauncherImpl.java:182)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$165(LauncherImpl.java:819)
	at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$179(PlatformImpl.java:326)
	at com.sun.javafx.application.PlatformImpl.lambda$null$177(PlatformImpl.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$178(PlatformImpl.java:294)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Caused by: uk.co.caprica.vlcj.factory.NativeLibraryMappingException: Failed to properly initialise the native library
	at uk.co.caprica.vlcj.factory.MediaPlayerFactory.discoverNativeLibrary(MediaPlayerFactory.java:195)
	at uk.co.caprica.vlcj.factory.MediaPlayerFactory.<init>(MediaPlayerFactory.java:119)
	at uk.co.caprica.vlcj.factory.MediaPlayerFactory.<init>(MediaPlayerFactory.java:174)
	at JavaFXDirectRenderingTest.<init>(JavaFXDirectRenderingTest.java:123)
	at AnimationTimerJavaFXDirectRenderingTest.<init>(AnimationTimerJavaFXDirectRenderingTest.java:33)
	... 10 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class uk.co.caprica.vlcj.binding.LibVlc
	at uk.co.caprica.vlcj.support.version.LibVlcVersion.<init>(LibVlcVersion.java:49)
	at uk.co.caprica.vlcj.factory.MediaPlayerFactory.checkVersion(MediaPlayerFactory.java:206)
	at uk.co.caprica.vlcj.factory.MediaPlayerFactory.discoverNativeLibrary(MediaPlayerFactory.java:192)
	... 14 more
Exception running application AnimationTimerJavaFXDirectRenderingTest

Problem is in your environment.

image
I already install vlc,is that what you mean?

Looks to me like the native library can't be found.

I have tested vlcj against latest OSX and it worked for me the last time I tested it.

So what library shoud I install?
help please...

image
This library is load failed.But I don't know how to install it.

Did you install VLC using the official package for OSX? Did you install it in the normal way?

I just spotted that you use "casks".

Try installing the official package from VideoLAN instead of using casks.

Thank you very much,I reinstall the package and work well.