java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operatio

2021/4/19 22:28:21

本文主要是介绍java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operatio,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

在音频文件转换是我调用了第三方的jar包,jl1.0.1.jar和jmp123.jar

服务器环境是centos5.4,但是将wav格式的语音文件装成wav16时报错java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it,转换失败,

修改方法,编辑tomcat的catalina.sh文件,在JAVA_OPTS中加入-Djava.awt.headless=false参数,如下

JAVA_OPTS=" -Djava.awt.headless=false"

成功!



这篇关于java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operatio的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程