1. 程式人生 > >Linux下運行Java項目時,出現No X11 DISPLAY variable was set, but this program performed an operation which requires it.的問題解決

Linux下運行Java項目時,出現No X11 DISPLAY variable was set, but this program performed an operation which requires it.的問題解決

per 出現 cnblogs -m performed program this exp code

在~/.bashrc環境變量文件最下方加入:

export DISPLAY=:0.0

然後,刷新環境變量以使其生效:

source ~/.bashrc

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

Linux下運行Java項目時,出現No X11 DISPLAY variable was set, but this program performed an operation which requires it.的問題解決