用脚本执行jdk时下面的错误

can not initialize UI,
Running in headless mode,
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
 
如何解决呢?
执行 
sudo vi /etc/profile

 

在文件尾部增加一行:
export  DISPLAY=:0

 

此时再去执行jdk脚本,就没有问题了。

相关文章:

  • 2021-05-04
  • 2022-01-16
  • 2022-12-23
  • 2021-11-29
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-04
  • 2022-02-07
  • 2022-01-21
  • 2021-11-18
  • 2021-11-18
  • 2021-11-18
相关资源
相似解决方案