Linux下tomcat處理圖片時需加上參數“-Djava.awt.headless=true”
linux下,如果拋出
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
解決辦法是
運行時加上-Djava.awt.headless=true
例如:
export JAVA_OPTS="-Djava.awt.headless=true"
本文出自 「每天進步一點點!」 博客,請務必保留此出處http://xiahongyuan.blog.51cto.com/906214/845095
[火星人 ] tomcat圖片問題解決方法已經有394次圍觀