Can 'tconnecttox11windowserverusing': 0.0 'asthevalueoftheDISPLAY

Source: Internet
Author: User
CantconnecttoX11windowserverusing: 0.0asthevalueoftheDISPLAY-general Linux technology-Linux programming and kernel information. For more information, see the following. In linux, many people will encounter Can't connect to X11 window server using ': 0.0' as the value of the DISPLAY variable.

Cause: Because graphic processing is used, the java program will look for the linux GUI to start

Solution: do not let java look for the linux gui. Add the option java-Djava. awt. headless = true when java is started.

Implementation: If tomcat is used, modify it in/usr/local/tomcat/bin/catalina. sh

JAVA_OPTS =-Djava. awt. headless = true

Echo "Using CATALINA_BASE: $ CATALINA_BASE"
Echo "Using CATALINA_HOME: $ CATALINA_HOME"
Echo "Using CATALINA_TMPDIR: $ CATALINA_TMPDIR"
Echo "Using RUNJAVA: $ _ RUNJAVA"
Echo "Using JAVA_OPTS: $ JAVA_OPTS"

Java will not need to be detected, and the problem will be solved naturally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.