---
title: "Ice.*"
url: https://docs.zeroc.com/ice/3.8/property-reference/ice-properties
language: java
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Ice.\*

Programming language: Java. Other languages: [C++](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/csharp.md), [JavaScript](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/php.md), [Python](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/ruby.md), [Swift](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/swift.md).

## Ice.BackgroundLocatorCacheUpdates

`Ice.BackgroundLocatorCacheUpdates=num`

If `num` is set to `0` (the default), an invocation on an indirect proxy whose endpoints are older than the configured [locator cache](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-clients/java.md) timeout triggers a locator cache update; the run time delays the invocation until the new endpoints are returned by the locator.

If `num` is set to a value larger than `0`, an invocation on an indirect proxy with expired endpoints still triggers a locator cache update, but the update is performed in the background, and the runtime uses the expired endpoints for the invocation. This avoids delaying the first invocation that follows expiry of a cache entry.

## Ice.BatchAutoFlushSize

`Ice.BatchAutoFlushSize=num` (in KiB)

This property controls how the Ice runtime deals with flushing of [batch messages](https://docs.zeroc.com/ice/3.8/runtime/invocation/invocation-mode/batched-invocations/java.md). If `num` is greater than `0`, the runtime automatically forces a flush of the current batch when a new message is added to a batch and that message would cause the batch to reach or exceed `num` KiB (1024 bytes per KiB). For stream transports, `0` disables automatic flushing: the application must flush batches explicitly. If not defined, the default value is `1024`.

For datagram proxies, Ice caps the flush threshold at [Ice.UDP.SndSize](https://docs.zeroc.com/ice/3.8/property-reference/ice-udp-properties/java.md) bytes, or 65507 bytes when that property is not set, including when `num` is `0`.

> **Warning**
>
> When flushed, batch requests are sent as a single Ice message. The Ice runtime in the receiver limits incoming messages to [Ice.MessageSizeMax](#ice.messagesizemax), so the sender must flush batch requests, manually or automatically, before they exceed this limit.

## Ice.CacheMessageBuffers

`Ice.CacheMessageBuffers=num`

If `num` is greater than `0`, the proxies cache message buffers for future reuse. This can improve performance and reduce the amount of garbage produced by Ice internals that the garbage collector would eventually spend time to reclaim. However, for applications that exchange very large messages, this cache may consume excessive amounts of memory and therefore should be disabled by setting this property to `0`.

The default value is `2`.

> **Note**
>
> This property only affects the caching of message buffers for invocations. The Ice runtime never caches message buffers for dispatches.

Ice for Java allocates non-direct message buffers when this property is set to `1` and direct message buffers when set to `2`. Use of direct message buffers minimizes copying and typically results in improved throughput.

## Ice.ClassGraphDepthMax

`Ice.ClassGraphDepthMax=num`

Specifies the maximum depth for a graph of Slice class instances to unmarshal. If this maximum is reached, the Ice runtime throws a `MarshalException`. Reading and destroying a Slice class graph are recursive operations. This property prevents stack overflows from occurring if a sender sends a very large graph and not enough space on the stack is available. To read larger graphs, you can increase the value of this property. If not specified, the default value is `10`.

Setting this property to `0` (or to a negative number) disables the depth limit altogether.

## Ice.Compression.Level

`Ice.Compression.Level=num`

Specifies the bzip2 compression level to use when [compressing protocol messages](https://docs.zeroc.com/ice/3.8/runtime/compression/java.md). Values range from `1` to `9`, where `1` represents the fastest compression and `9` represents the best compression. Note that higher levels cause the bzip2 algorithm to devote more resources to the compression effort, and may not result in a significant improvement over lower levels. If not specified, the default value is `1`.

## Ice.Config

```config
Ice.Config=config_file[,config_file,...]
Ice.Config=1
```

This property must be set from the command line with one of the options `--Ice.Config`, `--Ice.Config=1`, or `--Ice.Config=config_file`.

If the `Ice.Config` property is empty or set to `1`, or not set at all, the Ice runtime examines the contents of the [ICE\_CONFIG](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/using-configuration-files/java.md) environment variable to retrieve the path names of one or more configuration files. Otherwise, `Ice.Config` must be set to the path names of one or more configuration files, separated by commas (path names can be relative or absolute). Property values are read from each of the configuration files listed.

In Java, Ice first attempts to open a configuration file as a [class loader resource](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/alternate-property-stores/java.md). If that attempt fails, Ice opens the configuration file in the local file system.

Configuration files use a simple [syntax](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/configuration-file-syntax.md) consisting of *name*=*value* pairs with support for comments and escaping.

## Ice.HTTPProxyHost

`Ice.HTTPProxyHost=addr`

Specifies the host name or IP address of an HTTP proxy server. If `addr` is not empty, Ice uses the designated HTTP proxy server for all outgoing (client) connections.

## Ice.HTTPProxyPort

`Ice.HTTPProxyPort=num`

The port number of the HTTP proxy server. If not specified, the default value is `1080`.

## Ice.ImplicitContext

`Ice.ImplicitContext=type`

Specifies whether a communicator has an [implicit request context](https://docs.zeroc.com/ice/3.8/runtime/invocation/request-contexts/implicit-request-contexts/java.md) and, if so, at what scope the context applies. Legal values for this property are `None` (equivalent to the empty string), `PerThread`, and `Shared`. If not specified, the default value is `None`.

## Ice.InitPlugins

`Ice.InitPlugins=num`

If `num` is a value greater than `0`, the Ice runtime automatically initializes the plug-ins it has loaded. Ice initializes plug-ins in construction order; `InitializationData.pluginFactories` and `Ice.PluginLoadOrder` determine this order. An application may need to set this property to `0` in order to interact directly with a plug-in after it has been loaded but before it is initialized. In this case, the application must invoke `initializePlugins` on the plug-in manager to complete the initialization process. If not defined, the default value is `1`.

## Ice.IPv4

`Ice.IPv4=num`

Specifies whether Ice uses IPv4. If `num` is a value greater than `0`, IPv4 is enabled. If not specified, the default value is `1`.

## Ice.IPv6

`Ice.IPv6=num`

Specifies whether Ice uses IPv6. If `num` is a value greater than `0`, IPv6 is enabled. If not specified, the default value is `1` if the system supports the creation of IPv6 sockets, and `0` otherwise.

Java's default network stack always accepts both IPv4 and IPv6 connections regardless of the settings of `Ice.IPv6`. You can configure the Java runtime to use only IPv4 by starting your application with the following JVM option:

```shell
java -Djava.net.preferIPv4Stack=true ...
```

## Ice.LogFile

`Ice.LogFile=file`

Selects a file-based [logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/java.md) for the communicator. The logger appends messages to the specified file and creates the file if necessary. A logger supplied in `InitializationData` takes precedence over this property. The [per-process logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/per-process-logger/java.md) is unchanged.

On platforms other than Windows, `Ice.UseSyslog` and `Ice.LogFile` cannot be combined.

## Ice.MessageSizeMax

`Ice.MessageSizeMax=num` (in KiB)

Sets the maximum size of an incoming Ice protocol message, in KiB (1024 bytes). The limit applies to the whole message, including the protocol header; for a compressed message, it also applies to the decompressed size. The default value is `1024` (1 MiB).

A value of `0` or less selects the largest supported size; a positive value must be at most 2,097,151 KiB (about 2 GiB).

Ice rejects an incoming message that exceeds this limit and logs a warning when [Ice.Warn.Connections](https://docs.zeroc.com/ice/3.8/property-reference/ice-warn-properties/java.md) is set. Over connection-oriented transports, Ice also closes the connection: a client receiving an oversized reply gets a `MarshalException` from its invocation, and a client whose request is oversized gets a `ConnectionLostException`.

See also [adapter.MessageSizeMax](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/java.md).

## Ice.Package.*module*

`Ice.Package.module=package`

Specifies the enclosing Java package of the top-level Slice module *module*, the same package as in the module's `java:package` [metadata directive](https://docs.zeroc.com/ice/3.8/slice/slice-metadata-directives/java.md).

When one or more of these properties are set, the communicator adds a [ModuleToPackageSliceLoader](https://code.zeroc.com/ice/3.8/api/java/com.zeroc.ice/com/zeroc/Ice/ModuleToPackageSliceLoader.html) to its default [Slice loader](https://docs.zeroc.com/ice/3.8/slice/user-defined-types/classes/slice-loaders/java.md). This loader maps the Slice type IDs in each *module* to Java class names under the specified package. For example, with `Ice.Package.Demo=com.example`, it loads `com.example.Demo.Node` for the type ID `::Demo::Node`.

The loader finds a class or exception only when neither the type name nor an enclosing module name is remapped with `java:identifier`.

See also: [Ice.Default.Package](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/java.md)

## Ice.PluginLoadOrder

`Ice.PluginLoadOrder=names`

Specifies the order in which Ice creates the plug-ins installed through configuration, with `Ice.Plugin.name` properties. `names` lists plug-in names separated by commas or white space. Ice creates the plug-ins in `names` first, in that order, and then the other plug-ins installed through configuration, in an undefined order.

This property does not affect the plug-ins installed through `InitializationData.pluginFactories`, even when an `Ice.Plugin.name` property supplies their arguments: Ice creates these plug-ins in list order, before any plug-in installed through configuration.

## Ice.PreferIPv6Address

`Ice.PreferIPv6Address=num`

If both IPv4 and IPv6 are enabled (the default), specifies whether Ice prefers IPv6 addresses over IPv4 addresses when resolving hostnames. If `num` is a value greater than `0`, IPv6 addresses are preferred. If not specified, the default value is `0`.

## Ice.PrintAdapterReady

`Ice.PrintAdapterReady=num`

If `num` is set to a value larger than `0`, an object adapter prints "*adapter\_name* ready" on standard output after activation is complete. This is useful for scripts that need to wait until an object adapter is ready to be used.

## Ice.ProgramName

`Ice.ProgramName=name`

Specifies the program name used for logging. If this property is empty, communicator initialization selects the following default:

| Language | Default |
| --- | --- |
| C++ | `argv[0]` when you create the communicator with `Ice::initialize(argc, argv)`; otherwise the executable's base name on Linux, macOS, and Windows, and an empty string on other platforms. |
| MATLAB | The executable's base name. |
| C# | `AppDomain.CurrentDomain.FriendlyName`. |
| Java and JavaScript | An empty string. |
| Python | The base name of `sys.argv[0]`, when available. |
| Ruby | The base name of `$0`. |
| PHP | The base name of `$_SERVER['SCRIPT_FILENAME']`, when available. |
| Swift | The last path component of `CommandLine.arguments.first`, when available. |

For mappings based on the C++ runtime, an empty language-specific default falls back to the executable's base name on Linux, macOS and Windows. Setting this property to a non-empty value overrides the default.

In C# and Java, Ice also uses this value as a prefix for runtime thread names.

## Ice.RetryIntervals

`Ice.RetryIntervals=num [num ...]`

This property defines the number of times an operation is [automatically retried](https://docs.zeroc.com/ice/3.8/runtime/invocation/automatic-retries/java.md) and the delay between each retry. For example, if the property is set to `0 100 500`, the operation is retried 3 times: immediately after the first failure, again after waiting 100ms after the second failure, and again after waiting 500ms after the third failure. The default value (`0`) means Ice retries once immediately. A first value of `-1` disables retries.

## Ice.ServerIdleTime

`Ice.ServerIdleTime=num`

If `num` is set to a value larger than `0`, Ice automatically calls `shutdown` on the communicator when its server thread pool has been idle for `num` seconds. The server thread pool is not idle as long as any of its thread is performing some task, like dispatching a request.

This call to `shutdown` shuts down the communicator's server side and causes any thread waiting on `waitForShutdown` to return. After that, a server will typically do some clean-up work before exiting. The default value is `0`, meaning that the server will not shut down automatically. This property is often used for servers that are automatically [activated by IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-activation.md).

## Ice.SliceLoader.NotFoundCacheSize

`Ice.SliceLoader.NotFoundCacheSize=num`

When `num` is set to a value larger than `0`, the communicator installs an internal “not found” cache that caches failed Slice loader resolutions.

The default value is `100`.

See also [Ice.Warn.SliceLoader](https://docs.zeroc.com/ice/3.8/property-reference/ice-warn-properties/java.md).

## Ice.SOCKSProxyHost

`Ice.SOCKSProxyHost=addr`

Specifies the host name or IP address of a SOCKS proxy server. If `addr` is not empty, Ice uses the designated SOCKS proxy server for all outgoing (client) connections.

> **Note**
>
> Ice supports the SOCKS4 protocol, which requires IPv4. If both `Ice.SOCKSProxyHost` and `Ice.HTTPProxyHost` are set, Ice uses the SOCKS proxy.

## Ice.SOCKSProxyPort

`Ice.SOCKSProxyPort=num`

The port number of the SOCKS proxy server. If not specified, the default value is `1080`.

## Ice.StdErr

`Ice.StdErr=filename`

If `filename` is not empty, the standard error stream of this process is redirected to this file, in append mode. This property is checked only for the first communicator that is created in a process.

`Ice.StdErr` and `Ice.StdOut` can name the same file.

## Ice.StdOut

`Ice.StdOut=filename`

If `filename` is not empty, the standard output stream of this process is redirected to this file, in append mode. This property is checked only for the first communicator created in a process.

`Ice.StdErr` and `Ice.StdOut` can name the same file.

## Ice.SyslogFacility

`Ice.SyslogFacility=string` (not available on Windows)

This property sets the syslog facility to `string`. This property has no effect if `Ice.UseSyslog` is not set. Each communicator can use its own facility, even when several communicators in the same process log to `syslog`.

`string` can be any of syslog facilities: `LOG_AUTH, LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_FTP, LOG_KERN, LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7, LOG_LPR, LOG_MAIL, LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP`.

The default value is `LOG_USER`.

## Ice.SyslogHost

`Ice.SyslogHost=host` (not available on Windows)

Specifies the host name or IP address of the syslog daemon that receives log messages when [Ice.UseSyslog](#ice.usesyslog) is enabled. The default value is `localhost`.

## Ice.SyslogPort

`Ice.SyslogPort=port` (not available on Windows)

Specifies the UDP port of the syslog daemon at [Ice.SyslogHost](#ice.sysloghost). The default value is `514`. This property takes effect when [Ice.UseSyslog](#ice.usesyslog) is enabled.

## Ice.ThreadPriority

`Ice.ThreadPriority=value`

`value` specifies a thread priority. Threads created by the Ice runtime are created with the specified priority by default. Leaving this property unset causes the runtime to create threads with the system default priority. This property is unset by default.

`value` can be `MIN_PRIORITY`, `NORM_PRIORITY`, `MAX_PRIORITY`, or an integer between `1` and `10`.

The named values can also include the `java.lang.Thread.` prefix, for example `java.lang.Thread.NORM_PRIORITY`.

You can separately override the default priorities for the client and server thread pools using [Ice.ThreadPool.*name*.ThreadPriority](https://docs.zeroc.com/ice/3.8/property-reference/ice-threadpool-properties/java.md#ice.threadpool.name.threadpriority) as well as for a specific object adapter using [*adapter*.ThreadPool.ThreadPriority](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/java.md).

## Ice.ToStringMode

`Ice.ToStringMode=string`

`string` must be one of the following: `Unicode`, `ASCII`, `Compat`.

This property maps to an enumerator of [ToStringMode](https://code.zeroc.com/ice/3.8/api/java/com.zeroc.ice/com/zeroc/Ice/ToStringMode.html) and controls how `identityToString` and `proxyToString` on the communicator escape non-printable ASCII characters and non-ASCII characters.

The default value is `Unicode`.

## Ice.UseSyslog

`Ice.UseSyslog=num` (not available on Windows)

If `num` is greater than `0`, Ice for Java sends log messages as UDP datagrams to the syslog daemon configured by [Ice.SyslogHost](#ice.sysloghost) and [Ice.SyslogPort](#ice.syslogport). The messages use the RFC 3164 syslog format without a header and include the program name as their prefix. [Ice.SyslogFacility](#ice.syslogfacility) selects the facility. The default value of `Ice.UseSyslog` is `0`. Ice ignores this property on Windows.

On other platforms, this property cannot be combined with [Ice.LogFile](#ice.logfile).
