JavaFX使X Server崩溃 [英] JavaFX crashes X Server

查看:85
本文介绍了JavaFX使X Server崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景/上下文:

我目前正在开发一个旨在在Linux上运行的触摸屏应用程序.作为开发框架,我选择JavaFX(jdk1.7.0_10)是因为它具有快速原型制作的便利性.我使用的是Arch Linux(内核3.6.10-1-ARCH)发行版,并且由于JavaFX需要完整的环境才能运行,因此我在基本配置之上安装了Xorg.甚至认为我能够运行JavaFX应用程序,但我的应用程序中显示的弹出窗口仍然存在一些问题.

I'm currently developing a touch screen application which is aimed to run on Linux. As a development framework I chose JavaFX (jdk1.7.0_10) due to its rapid prototyping easiness. I'm using Arch Linux (kernel 3.6.10-1-ARCH) distribution and since JavaFX needs a head-full environment to run, I installed Xorg on top of the base configuration. Even thought I'm able to run my JavaFX application, I have some issues with popup windows that are being displayed in my application.

当试图显示那些弹出窗口时,有时它们没有按预期响应或发生更糟的事件,它们使我的应用程序崩溃.我得到的错误如下:

When trying to display those popup windows, sometimes they don't respond as expected or event worse, they crash my application. The error I get is the following:

The program 'java' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
(Details: serial 51101 error_code 9 request_code 62 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

顺便说一句,当在Windows(我的开发机)上运行相同的应用程序时,一切正常.

By the way, when running the same application on Windows (my development machine), everything works fine.

我还尝试运行复合管理器('xcompmgr'),因为我也收到了类似的警告

I also tried to run a composite manager ('xcompmgr') since i was also getting some warnings like

Can't create transparent stage, because your screen doesn't support alpha channel. You need to enable XComposite extension.

但没有帮助.

问题:

我是否缺少一些文件或配置以便在Linux上平稳运行JavaFX,还是有人遇到过同样的挑战?由于我主要关注的是性能(由于有限的硬件规格),因此我不想安装功能齐全的Linux发行版.我只需要运行JavaFX应用程序即可.

Am i missing some files or configurations in order to run smoothly JavaFX in Linux, or has any one encountered the same challenge? Since my main concern is performance (due to limited hardware specs), I don't want to install a full featured Linux distribution. I only need to run my JavaFX application.

推荐答案

尝试以软件渲染模式运行JavaFX:java -Dprism.order=j2d -jar your.jar

Try running JavaFX in software rendering mode: java -Dprism.order=j2d -jar your.jar

还要注意,您的平台似乎未包含在受支持的平台列表中: http://www.oracle.com/technetwork/java/javafx/downloads/supportedconfigurations-1506746.html

Also note that your platforms seems to be not included into list of supported ones: http://www.oracle.com/technetwork/java/javafx/downloads/supportedconfigurations-1506746.html

这篇关于JavaFX使X Server崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆