为什么 Java 中 main.replay() 方法没有被执行?但完全相同的代码可以在 Fedora 中运行,但不能在 Archlinux 中运行
我有一个简单的播放器,我正在使用第三方库。完全相同的代码在我的 Fedora 桌面上运行。但是当我在 Archlinux 中使用完全相同的代码时,它无法执行 main.replay();
是什么原因造成的?
public static void play(String gsttest)
{
try {
gst.play();
gst.getBus().connect(new Bus.EOS()
{
public void endOfStream(GObject source)
{
//_7-------------_7
main.replay(); //<< never getting executed in Archlinux
//_7------------_7 but Fedora it runs without any problem.
}
});
} catch (Exception ex) {
}
}
My Java where its not working is:
$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (ArchLinux-6.b22_1.10.3-1-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
My Java where its working is:
$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (fedora-59.1.10.3.fc15-i386)
OpenJDK Server VM (build 20.0-b11, mixed mode)
I have a simple player i am using third party libraries. Exactly the same code is working in my Fedora desktop. But when i am using exactly the same code in Archlinux
it does not work to do main.replay();
What is causing it?
public static void play(String gsttest)
{
try {
gst.play();
gst.getBus().connect(new Bus.EOS()
{
public void endOfStream(GObject source)
{
//_7-------------_7
main.replay(); //<< never getting executed in Archlinux
//_7------------_7 but Fedora it runs without any problem.
}
});
} catch (Exception ex) {
}
}
My Java where its not working is:
$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (ArchLinux-6.b22_1.10.3-1-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
My Java where its working is:
$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.3) (fedora-59.1.10.3.fc15-i386)
OpenJDK Server VM (build 20.0-b11, mixed mode)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过 捕获 Throwable?
,它会打印任何东西吗?
如果您事先声明 Bus 类并稍后在连接中使用它,行为会改变吗?
Have you tried catching a Throwable?
If not, does it print anything?
If you declare that Bus class before hand and use it later in connect, does the behavior change?