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

Example

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

bin\setenv.bat (Windows)
bin/setenv.sh (Unix, Linux OS X)

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

See below

Tomcat .war installation

bin\setenv.bat (Windows)
bin/setenv.sh (Unix)
(files must be created)

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)

Weblogic

$BEA_HOME/domain/<domain>/startWebLogic.sh

JAVA_OPTIONS

export JAVA_OPTIONS="$JAVA_OPTIONS -Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 -Xms256m -Xmx512m -XX:MaxPermSize=256m"

JBoss

bin/run.sh

JAVA_OPTS

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

WebSphere

n/a

Application Server > Process Definition > JVM Arguments

-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 -Xms256m -Xmx512m -XX:MaxPermSize=256m

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.

RELATED TOPICS

Recognised System Properties