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

xiaoxiao2021-03-06  43

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 image automatic generator, normal on Windows; LINUX, the above error reason is that the Windows kernel integrates the GUI, and the X Server solution is not started on Linux: 1. Start X Server 2. Add -Djava.awt.Headless = TRUE in Java running parameters = True I modified the startup file of the application server. For example, Tomcat./bin/catalina.sh is in all -DCATALINA.HOME = "$ catalina_home" / below) - Djava.awt.Headless = true / this seems to be a bit stupid, but after all solved the problem.

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

New Post(0)