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-为什么我的重画不起作用?


下一篇:皕杰报表在Linux下出现不能初始化图形环境的问题