---
title: "Setting Properties on the Command Line"
url: https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/setting-properties-on-the-command-line
docs_index: https://docs.zeroc.com/llms.txt
---

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

# Setting Properties on the Command Line

When you pass the command-line arguments of your program to communicator [initialization](https://docs.zeroc.com/ice/3.8/runtime/communicator.md#creating-a-communicator), Ice sets a property for each argument of the form `--name=value` where `name` is the name of an Ice property, and removes this argument. For example:

```shell
./server --Ice.Trace.Network=3 --verbose
```

sets `Ice.Trace.Network` to `3`, and `--verbose` remains for your application.

When the command line sets the same property more than once, the last one applies. An argument without `=value` sets the property to `1`, and an argument with an empty value clears the property:

```shell
./server --Ice.Trace.Protocol     # same as --Ice.Trace.Protocol=1
./server --Ice.Trace.Protocol=    # clears Ice.Trace.Protocol
```

Ice [validates](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/properties-overview.md#property-validation) these arguments like any other property: an argument whose name begins with a [reserved prefix](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/properties-overview.md#reserved-prefixes) and a dot but is not the name of an Ice property, such as `--Ice.Foo=1`, makes communicator initialization fail.

## Remaining Arguments

Ice removes the arguments it converts into properties, and [Creating a Communicator](https://docs.zeroc.com/ice/3.8/runtime/communicator.md#creating-a-communicator) shows how each mapping returns the remaining arguments. Initialize the communicator before you parse these arguments, so that your application sees only the arguments meant for it.

## See Also

- [Using Configuration Files](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/using-configuration-files.md)
- [Communicator](https://docs.zeroc.com/ice/3.8/runtime/communicator.md)
