编程语言
首页 > 编程语言> > java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operatio

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"

成功!

标签:set,false,No,Djava,awt,jar,java
来源: https://blog.51cto.com/u_15095774/2718427