对于 java 1.4以上,启动java时加上 -Djava.awt.headless=true 的参数。对于 Java 1.4 以前,下载 xvfb 或者其他的虚拟 x-window 软件,再在 Java 运行环境里的 DISPLAY 作相应改变。
对于 Resin,具体的修改办法是,修改 httpd.sh 文件,把其中的 args= 行修改为 args=-Djava.awt.headless=true。
转载自http://shaofanyun.mblogger.cn/(部分)
例如: catalina.sh
#!/bin/sh
# -----------------------------------------------------------------------------
# Start/Stop Script for the CATALINA Server
#
# Environment Variable PRequisites
#
# CATALINA_HOME May point at your Catalina "build" Directory.
#
# CATALINA_BASE (Optional) Base directory for resolving dynamic portions
# of a Catalina installation. If not present, resolves to
# the same directory that CATALINA_HOME points to.
#
# CATALINA_OPTS (Optional) Java runtime options used when the "start",
# "stop", or "run" command is executed.
#
# CATALINA_TMPDIR (Optional) Directory path location of temporary directory
# the JVM should use (java.io.tmpdir). Defaults to
# $CATALINA_BASE/temp.
#
# JAVA_HOME Must point at your Java Development Kit installation.
#
# JAVA_OPTS (Optional) Java runtime options used when the "start",
# "stop", or "run" command is executed.
#
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
# command is executed. The default is "dt_socket".
#
# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
# command is executed. The default is 8000.
#
# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
# (JSSE) installation, whose JAR files will be added to the
新闻热点
疑难解答