Linux下运行Java项目时,出现No X11 DISPLAY variable was set, but this program performed an operation which requires it.的问题解决

在~/.bashrc环境变量文件最下方加入:

export DISPLAY=:0.0

然后,刷新环境变量以使其生效:

source ~/.bashrc

参考:http://stackoverflow.com/questions/662421/no-x11-display-variable-what-does-it-mean

posted @ 2017-05-09 20:59  EasonJim  阅读(22958)  评论(0编辑  收藏  举报