问题描述:tomcat启动项目图片验证码加载不出来

项目启动图片验证码加载不出来

1.缺少libgcc.so包

解决方法

sudo yum install libgcc.i686 --setopt=protected_multilib=false
安装完成就可以了。

2.如果是单独报错:

error:Handler dispatch failed; nested exception is java.awt.AWTError: Can’t connect to X11 window server using ‘localhost:15.0’ as the value of the DISPLAY variable.

解决方法

项目启动图片验证码加载不出来
在tomcat/bin目录下的catalina.sh文件中添加这一句,一劳永逸
或者在启动的时候加上这一句:./startup.sh -Djava.awt.headless=true
就可以解决了

相关文章:

  • 2022-12-23
  • 2021-12-02
  • 2021-03-26
  • 2022-01-02
  • 2021-10-15
  • 2022-12-23
  • 2022-01-05
  • 2021-07-02
猜你喜欢
  • 2021-12-23
  • 2021-06-03
  • 2022-01-02
  • 2021-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-04-30
相关资源
相似解决方案