问题描述
我最近升级到fedora 21.我非常喜欢它,但是,javafx MediaPlayer不起作用。
I recently upgraded to fedora 21. I really like it, however, javafx MediaPlayer doesn't work.
根据JavaFX系统要求站点,对于Linux发布我想要的MediaPlayer的发行版:
As per the JavaFX System Requirements Site, for a Linux distro to create A MediaPlayer I need:
libavcodec53
libavformat53
我在Fedora存储库中找不到任何这些软件包(或者通过google搜索fedora 21找到任何关于它们的信息,我还检查了搜索fedora 20,但我成功地将它们从ATRpm安装到我的系统上并且仍然没有运气。
I couldn't find any of these packages in the Fedora repositories (or anything about them with a google search for fedora 21 and I also checked a search for fedora 20, however I managed to get them installed from ATRpm's onto my system successfully and still no luck.
我还安装了 ffmpeg
和 ffmpeg-devel
和 ffmpeg-libs
,还有转码,它仍会抛出此异常。
I also installed ffmpeg
and ffmpeg-devel
and ffmpeg-libs
, and also transcode, and it still throws this exception.
这是我的StackTrace,如果你需要它:
Here Is My StackTrace If You Need It:
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(LauncherImpl.java:157)
at com.sun.javafx.application.LauncherImpl$$Lambda$1/791452441.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!
at javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146)
at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:511)
at javafx.scene.media.MediaPlayer.<init>(MediaPlayer.java:414)
at brainwaveentrainment.Main.start(Main.java:22)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(LauncherImpl.java:821)
at com.sun.javafx.application.LauncherImpl$$Lambda$55/632695357.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(PlatformImpl.java:323)
at com.sun.javafx.application.PlatformImpl$$Lambda$51/744796612.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
at com.sun.javafx.application.PlatformImpl$$Lambda$53/731343915.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl$$Lambda$52/7923443.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$45(GtkApplication.java:126)
at com.sun.glass.ui.gtk.GtkApplication$$Lambda$43/896313952.run(Unknown Source)
... 1 more
Caused by: com.sun.media.jfxmedia.MediaException: Could not create player!
at com.sun.media.jfxmediaimpl.NativeMediaManager.getPlayer(NativeMediaManager.java:222)
at com.sun.media.jfxmedia.MediaManager.getPlayer(MediaManager.java:104)
at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:467)
... 16 more
有人能指出我正确的方向为我的fedora系统找到必要的库以允许JavaFX成功创建MediaPlayer对象吗?
Can anyone point me to the right direction to find the necessary libraries for my fedora system to allow JavaFX to successfully create MediaPlayer objects?
任何帮助都将是非常感谢。
Any help would be greatly appreciated.
推荐答案
请注意,很少有专有组件(包括JavaFX,部署,Java DB和Java Mission Control)不包含在Fedora包。
note that few proprietary components (including JavaFX, Deployment, Java DB and Java Mission Control) are not included in Fedora packages.
这篇关于fedora 21 javafx没有创建媒体播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!