Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

          Java进行图形处理时默认需要X11环境,如果在服务器启动过程中提示X11不存在或异常等,例如:“No X11 DISPLAY variable was set, but this program performed an operation which requires it. ”的错误,则表示服务器无法正常启动X11环境。

解决办法


      这时可以添加-DJavaDjava.awt.headless=true参数使得Java不使用X11环境,在startup.sh中#!/bin/sh 的下一行中添加一个新行:
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

...