linux下awt错误 Can't connect to X11 window server using ':0.0'

在Linux下对awt进行处理,出现如下错误
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable

设置参数catalina.sh: -Djava.awt.headless=true
or System.setProperty ("java.awt.headless", "true");

你可能感兴趣的:(java,linux)