Currently, when doing projects, involves dynamically generating images on the web, developing on Windows, deploying to Linux Server. Everything is fine on Window, which can appear in Linux that cannot be displayed.
I am using JFreeChart and Cewolf to generate a picture. At the beginning, the package of the two code library, the error message can only be displayed in a Taglib in Cewolf, and cannot be further tracked. Later, Download's source code of these two libraries, instead of the package file, and finally discovered problems, error information display: Can't connect to x11 window server using ': 0.0' as the value of the display variable. It seems that it is a problem It is a graphic library that cannot call XWindows. Ok, put the error message in Google's last search and discovered a solution. On Linux, starting Catalina_OPTS = "$ CATALINA_OPTS -DJAVA.AWT.HEADLESS = true", restart Tomcat, and solve the problem.
The following is a detailed description and is posted for reference:
Java's solution to graphics in Linux