A newer version of Platform is available.

View latest

Configuring with System Properties

You can use system properties to configure some aspects of Hazelcast. You set these properties as name and value pairs through declarative configuration, programmatic configuration or JVM system property. Following are examples for each option.

Using Java?
If you use configuration builders or the new Config() constructor with the Java member API, you cannot override existing configuration with system properties and environment variables. To override existing configuration, you must use configuration loaders.

Unresolved include directive in modules/configuration/pages/configuring-with-system-properties.adoc - include::partial$warning-override.adoc[]

You can set system properties as name and value pairs through declarative configuration, programmatic configuration, or JVM arguments:

  • XML

  • YAML

<hazelcast>
    ...
    <properties>
        <property name="hazelcast.property.foo">value</property>
    </properties>
    ...
</hazelcast>
hazelcast:
    ...
    properties:
      hazelcast.property.foo: value
    ...

Programmatic Configuration:

Config config = new Config();
config.setProperty( "hazelcast.property.foo", "value" );

Using JVM’s System class or -D argument:

System.setProperty( "hazelcast.property.foo", "value" );

or

java -Dhazelcast.property.foo=value

All Hazelcast system properties are listed in the System Properties appendix with their descriptions, default values and property types as a reference for you.