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

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

# Ice.Plugin.\*

Parts of this page are for some programming languages only, and name them. For one language's text alone, see [C++](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/php.md), [Python](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/ruby.md), and [Swift](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/swift.md).

> **JavaScript**
>
> > **JavaScript**
> >
> > Ice for JavaScript does not support the properties on this page. Setting any of them throws `PropertyException`.

> **C++, C#, Java, Python, Ruby, PHP, MATLAB, and Swift**
>
> ## Ice.Plugin.*name*

> **C++, Python, Ruby, PHP, MATLAB, and Swift**
>
> `Ice.Plugin.name=path[,version]:function [args]`
>
> Defines a C++ plug-in to be installed during communicator initialization. The `path` and optional `version` components are used to construct the path name of a DLL or shared library. If no version is supplied, the Ice version is used. The `function` component is the name of a function with C linkage. For example, the entry point `MyPlugin,38:create` would imply a shared library name of `libMyPlugin.so.38` on Linux, `libMyPlugin.38.dylib` on macOS, and `MyPlugin38.dll` on Windows. Furthermore, if Ice is built on Windows with debugging, a `d` is automatically appended to the version (for example, `MyPlugin38d.dll`). On macOS, if the `.dylib` cannot be loaded, Ice also tries `libMyPlugin.38.so` and `libMyPlugin.38.bundle`.
>
> Arguments of the form `--name.X=Y` set the property `name.X` to `Y` and are removed from the argument list passed to the factory, where `name` is the plug-in name. For example, `--MyPlugin.Mode=fast` sets `MyPlugin.Mode=fast`.
>
> Ice passes the remaining arguments to the entry point function. For example:
>
> ```config
> Ice.Plugin.MyPlugin=MyFactory,38:create arg1 arg2
> ```
>
> Whitespace separates the arguments, and any arguments that contain whitespace must be enclosed in quotes.
>
> The `path` component may optionally contain a relative or absolute path name, indicated by the presence of a path separator (`/` or `\`). In this case, the last component of the path is used to construct the version-specific name of the shared library or DLL. Consider this example:
>
> ```config
> Ice.Plugin.MyPlugin=./MyFactory,38:create arg1 arg2
> ```
>
> The use of a relative path means the Ice runtime looks in the current working directory for `libMyFactory.so.38` on Linux, `libMyFactory.38.dylib` on macOS, or `MyFactory38.dll` on Windows.
>
> If the `path` component contains spaces, the entire entry point must be enclosed in quotes:
>
> ```config
> Ice.Plugin.MyPlugin="C:\Program Files\MyPlugin\MyFactory,38:create" arg1 arg2
> ```
>
> If the `path` component does not include a leading path name, Ice delegates to the operating system to locate the shared library or DLL, which typically means that the plug-in can reside in any of the directories in your shared library or DLL search path.
>
> > **C++**
> >
> > > **Note**
> > >
> > > The `Ice.Plugin.name` property can be used to configure a plug-in installed in the communicator using `InitializationData::pluginFactories`. In this situation, the `path[,version]:function` component of the property value is ignored.
>
> > **Python, Ruby, PHP, MATLAB, and Swift**
> >
> > Ice includes the IceDiscovery and IceLocatorDiscovery plug-in factories in this mapping. A non-empty value for either property enables the corresponding built-in factory; the entry-point token is ignored:
> >
> > ```config
> > Ice.Plugin.IceDiscovery=1
> > Ice.Plugin.IceLocatorDiscovery=1
> > ```
> >
> > Ice passes the remaining arguments after the first token to the factory. Ice creates these built-in plug-ins before dynamically loaded plug-ins.

> **C#**
>
> `Ice.Plugin.name=assembly:class [args]`
>
> Defines a C# plug-in to be installed during communicator initialization. The `assembly` component can be a partially or fully qualified assembly name, or an assembly path name.
>
> The `assembly` component accepts these forms:
>
> | Form | Examples |
> | --- | --- |
> | Assembly name | `myplugin,Version=...,Culture=neutral,publicKeyToken=...` or `myplugin` |
> | Assembly path | `MyPlugin.dll`, `plugins\MyPlugin.dll` or `C:\plugins\MyPlugin.dll` |
>
> The specified `class` must implement the [PluginFactory](https://code.zeroc.com/ice/3.8/api/csharp/api/Ice.PluginFactory.html) interface.
>
> Arguments of the form `--name.X=Y` set the property `name.X` to `Y` and are removed from the argument list passed to the factory, where `name` is the plug-in name. For example, `--MyPlugin.Mode=fast` sets `MyPlugin.Mode=fast`.
>
> Ice passes the remaining arguments to the factory's `create` method. For example:
>
> ```config
> Ice.Plugin.MyPlugin=MyFactory,Version=1.2.3.4:MyFactory arg1 arg2
> ```
>
> The factory class must provide a public parameterless constructor.
>
> Whitespace separates the arguments, and any arguments that contain whitespace must be enclosed in quotes.
>
> If you specify a relative path name in the entry point, the assembly is located relative to the program's current working directory:
>
> ```config
> Ice.Plugin.MyPlugin=..\MyFactory.dll:MyFactory arg1 arg2
> ```
>
> Enclose the assembly's path name in quotes if it contains spaces:
>
> ```config
> Ice.Plugin.MyPlugin="C:\Program Files\MyPlugin\MyFactory.dll:MyFactory" arg1 arg2
> ```
>
> Assembly names use the [.NET assembly-loading rules](https://learn.microsoft.com/en-us/dotnet/core/dependency-loading/loading-managed), including already-loaded assemblies, probing paths and assembly-resolution callbacks.
>
> A matching `Ice.Plugin.name` property can also supply arguments for a factory installed through `InitializationData.pluginFactories`. Ice ignores the first token of the value, which holds the entry point of a plug-in loaded through configuration, and passes the remaining tokens to the factory. By convention, this first token is `1`.

> **Java**
>
> `Ice.Plugin.name=[path:]class [args]`
>
> Defines a Java plug-in to be installed during communicator initialization. The specified class must implement the [PluginFactory](https://code.zeroc.com/ice/3.8/api/java/com.zeroc.ice/com/zeroc/Ice/PluginFactory.html) interface.
>
> Arguments of the form `--name.X=Y` set the property `name.X` to `Y` and are removed from the argument list passed to the factory, where `name` is the plug-in name. For example, `--MyPlugin.Mode=fast` sets `MyPlugin.Mode=fast`.
>
> Ice passes the remaining arguments to the factory's `create` method. For example:
>
> ```config
> Ice.Plugin.MyPlugin=MyFactory arg1 arg2
> ```
>
> The factory class and its no-argument constructor must be public.
>
> Whitespace separates the arguments, and any arguments that contain whitespace must be enclosed in quotes.
>
> If `path` is specified, it may be the path name of a JAR file or class directory, as shown below:
>
> ```config
> Ice.Plugin.MyPlugin=MyFactory.jar:MyFactory
> Ice.Plugin.MyOtherPlugin=/classes:MyOtherFactory
> ```
>
> If `path` contains spaces, it must be enclosed in quotes:
>
> ```config
> Ice.Plugin.MyPlugin="factory classes.jar":MyFactory
> ```
>
> If `class` is specified without a path, Ice attempts to load the class using class loaders. See [InitializationData.classLoader](https://code.zeroc.com/ice/3.8/api/java/com.zeroc.ice/com/zeroc/Ice/InitializationData.html#classLoader).
>
> A matching `Ice.Plugin.name` property can also supply arguments for a factory installed through `InitializationData.pluginFactories`. Ice ignores the first token of the value, which holds the entry point of a plug-in loaded through configuration, and passes the remaining tokens to the factory. By convention, this first token is `1`.
