无法在Ubuntu 13.10上调用JavaFX中的showSaveDialog

时间:2014-01-24 09:50:00

标签: java ubuntu javafx

我正试图通过以下方式致电showSaveDialog

FileChooser fileChooser = new FileChooser();
fileChooser.setTitle(title);

return fileChooser.showSaveDialog(null);

但是整个程序中止了以下输出:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f7d783e3500, pid=22008, tid=140176664483584
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libgdk-x11-2.0.so.0+0x6a500]  gdk_window_set_geometry_hints+0x0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try     "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/sk_/projects/mjolnirr/hs_err_pid22008.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

我怎样才能让它发挥作用?

1 个答案:

答案 0 :(得分:0)

使用vlcj并通过添加JVM选项-DVLCJ_INITX=no

修复它

找到解决方案here