Can't Connect to X11 Window Server Error Solution on Linux

xiaoxiao2021-03-06  87

Exception in thread "main" java.lang.InternalError: Can not connect to X11 window server using 'localhost: 11.0'. As the value of the DISPLAY variable at sun.awt.X11GraphicsEnvironment.initDisplay (Native Method) at sun.awt .X11GraphicsEnvironment. (X11GraphicsEnvironment.java:134) at java.lang.Class.forName0 (Native Method) at java.lang.Class.forName (Class.java:141) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment .java: 62) At java.awt.font.initializefont (font.java: 38) at java.awt.font. (font.java: 344) at Org.jfree.Chart.axis.AxisconStants. (unknown source) at Org.jfree.Chart.axis.categoryaxis. (unknown source) at Org.jfree.Chart.ChartFactory. CreateLineChart (Unknown Source)

I made a verification code picture automatic generator, normal on Windows; I have reported above Linux.

The reason is that the Windows kernel integrates the GUI, and X Server is started on Linux

Solution: 1. Start X Server

2. Add -Djava.awt.Headless = true on Java running parameters

Problem solve, everyone can see my verification picture: http://www.youkone.com/authimage.ww

转载请注明原文地址:https://www.9cbs.com/read-107031.html

New Post(0)