linux在安装jdk时报错

用脚本执行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脚本,就没有问题了。

你可能感兴趣的:(linux)