Use jfreechart in linux
Use jfreechart to generate images. in windows, there is no problem. In linux, cocould not initialize class org. jfree. chart. JFreeChart
JFreeChart cannot be initialized by default in linux.
The Headless mode is a system configuration mode. In this mode, the system lacks a display device, keyboard, or mouse. Although the Headless mode is not what we are willing to see, in fact, we often need to work in this mode, especially for server-side program developers. Because servers (such as hosts that provide Web services) may lack the aforementioned devices, but they need to use the functions they provide to generate corresponding data, to the client (such as the host with the relevant display device, keyboard, and mouse in the browser ).
Solution
Add the following lines in catalina. sh under bin:
Export CATALINA_OPTS = "-Djava. awt. headless = true"
Simply add the beginning of the field.