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

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

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   

 

转载于:https://my.oschina.net/xiaominmin/blog/1598162

你可能感兴趣的:(Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:)