The company project is required to use the JFreeChart statistics chart. This part of the code is almost written by others, and then withdraws, all the code throws me, slowly see, probably understand the implementation process, nothing is called Some methods in jfreechart are not too difficult. I used to release it. I didn't know normal. But after picking up, I showed normal, the program is not wrong, the program is the easiest, there is a free own I want to do things.
Now put these Dongdong to Linux, don't be familiar with Linux, asking for the answer on the Internet,
I finally put JDK and server, next to release applications, step by step. Nothing, but when I got it, it is always wrong.
When you click on the display pie chart, you will be wrong;
CAN't Connect to X11 Window Server Using ': 0.0' as the value of the display variable.
A option to display a three-dimensional image is provided when the pie chart is displayed. When the option is selected, the following error occurs:
Org.apache.jasper.jasperexception: Org.jfree.Chart.plot.pieplot
There are also a few charts, boundary graphs, graphs, etc., some shows the error message, some pages are blank, start thinking that the program code is problematic. I think I think it is impossible, and I thought I didn't have a machine with my machine. The same is consistent, and then re-covered it once, try again,: (still the same, spending me for a long time, and finally asking a friend, he told me.
This is the reason for this error: "CAN't Connect to X11 Window Server Using ': 0.0' as the value of the display variable." Is:
"
This error is because the chart program is implemented through the AWT. The AWT will call the operating system local window resource drawing. Windows supports this very well. If there is no X window in Linux, AW is not drawing ",
The above sentence is a friend telling me. When I started the server, I started to go to window mode. Why can't I do it, but later, it is easy to solve it.
Open the character terminal, where is you as follows:
Export Display =: 0
Then use the set to see if export display =: 0 already exists, indicating that the setting is already good, then try, oh, not, then restart the machine, ^ _ ^ lovely chart shows it,
Let me be pine, for different machines, there may be no need to restart, take effect, huh, if there is a friend, if you encounter the same problem, and if you can't find the answer, please refer to it, maybe help .
I wish every friend will have something to gain every day.
It is now missed a truth. If you write a program, the more you see more, the more you know, the more you know, you can also learn more things, think more of the solution. It may also make you deeper understand what is program, what is programming. Oh, the experience is to accumulate from the problem.