Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException

Exception in thread AWT-EventQueue-0 java.awt.HeadlessException:Exception in thread AWT-EventQue

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:

Exception in thread "AWT-EventQueue-0" 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)
?

解决方案:

?? 增加这个在java启动参数里

    -Djava.awt.headless=true??

?