linux异常系列:Can't connect to X11 window

来源:互联网 发布:ibm 云计算 编辑:程序博客网 时间:2024/05/16 08:31

java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.

原因:因为用到了图形处理,java程序会去寻找linux上的图形界面是否启动

解决:

.bash_profile?加了个export?JAVA_OPTS=-Djava.awt.headless=true

 

source .bash_profile生效