我正在使用RazorSQL,当我从终端运行它时,它没有打开并引发以下异常:

java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:535)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:218)
    at load.RazorSQL.main(Unknown Source)
1389939280395: Unable to show launch screen: null
1389939280577: Attempting to load . . .
java.lang.ExceptionInInitializerError
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(Unknown Source)
    at load.c.z(Unknown Source)
    at load.c.<init>(Unknown Source)
    at load.c.<init>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at load.RazorSQL.main(Unknown Source)
Caused by: java.awt.HeadlessException
    at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:227)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.look


它以前工作正常,但突然停止工作。我可以从异常中推断出它给出了一个摆动错误,因此它是GUI错误。无法打开打开图标razorsql.png。

任何人都知道为什么它不起作用?

最佳答案

在我看来,此错误与razorsql无关。检查系统中是否正确安装了Java图形库。
为了更确定,请安装JRE。我希望这能解决您的问题。 Ubuntu可以安装无头Java。

sudo apt-get install openjdk-6-jdk
sudo apt-get install openjdk-6-jre

09-16 16:01