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启动参数里

Java代码   收藏代码
  1. -Djava.awt.headless= true   

 

你可能感兴趣的:(exception)