In general, you can configure system properties by providing an argument of -Dprop=value to a Java program when it starts up.

Because Confluence is a Java web application, the Java program is typically your application server. Therefore, you need to configure system properties in your application server's start-up script.

Below is a general example of how system properties are configured for any Java application. The system property arguments can appear anywhere in the argument list.

java ... -Dhttp.proxyHost=proxy.example.org -Dhttp.proxyPort=8080

The above example configures two system properties: http.proxyHost and http.proxyPort with values proxy.example.org and 8080 respectively.

Sometimes instructions will say simply 'set system property X', without saying what it should be set to. In this case, it is usually sufficient to simply use -Dprop, without a value. For example:

java ... -Datlassian.mail.disable

Application Server Examples

Please consult your application server documentation for how to provide system properties to the Java runtime or to a particular application server.

Below are some examples of how to start up different application servers with these system properties set:

AppServer

Startup Script

Variable to Edit

Confluence Stand-alone .zip or .tar.gz Distribution

setenv.bat (Windows): This script is found in the 'bin' sub-directory, in your Tomcat directory.
bin/setenv.sh (Unix, Linux OS X): This script is found in the 'bin' sub-directory, in your Tomcat directory.

JAVA_OPTS

set JAVA_OPTS=-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 -Xms256m -Xmx512m -XX:MaxPermSize=256m (Windows)
export JAVA_OPTS="-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 -Xms256m -Xmx512m -XX:MaxPermSize=256m" (Unix)

Tomcat Windows Service

n/a

n/a

以降を確認

Tomcat .war installation

setenv.bat (Windows): This script is found in the 'bin' sub-directory, in your Tomcat directory.
bin/setenv.sh (Unix): This script is found in the 'bin' sub-directory, in your Tomcat directory.
(you must create these files, if they are not already present)

JAVA_OPTS

set JAVA_OPTS=%JAVA_OPTS% -Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 -Xms256m -Xmx512m -XX:MaxPermSize=256m (Windows)
export JAVA_OPTS="-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 -Xms256m -Xmx512m -XX:MaxPermSize=256m" (Unix)

Configuring System Properties in Tomcat as a Windows Service

Defining JAVA_OPTS in your setenv.bat file will not be sufficient to configure system properties if you are running Confluence with Tomcat as a Windows Service. Rather, there are two ways to configure system properties:

  • through the Tomcat configuration application, normally found in the Windows system tray
  • updating the service configuration directly in your Windows Registry.

As an example of the latter, for Tomcat 5 you will need to modify HKEY_LOCAL_MACHINE -> SOFTWARE -> Apache Software Foundation -> Procrun 2.0 -> Tomcat5 -> Parameters -> Java -> Options and add the JAVA_OPTS parameter there with the necessary system properties. JvmMx and JvmMs are listed separately from the additional options. See Editing the Windows Registry for details.

Displaying the System Properties

To see what Confluence is using, check Displaying System Properties.

関連トピック

認識済みのシステム プロパティ