Linux 无图形处理服务 时,画图功能不能用
iso1.:Can’t connect to X11 window
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_OPTIONS="${JAVA_OPTIONS} -Djava.awt.headless=true"
.bash_profile 一般在 /home/用户名/ 下
source .bash_profile生效
linux Can't connect to X11 window
最新推荐文章于 2025-01-02 11:05:36 发布