用脚本执行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=:
此时再去执行jdk脚本,就没有问题了。