获得无头异常:未设置 X11 DISPLAY 变量
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:432)
at java.awt.Frame.<init>(Frame.java:403)
at javax.swing.JFrame.<init>(JFrame.java:202)
at DrawGUI.<init>(DrawGUI.java:15)
at ShapeCreator.<init>(ShapeCreator.java:31)
at ShapeCreator.main(ShapeCreator.java:138)
此错误消息是什么意思?我该如何解决它?