.. _Set the License:

Set the License
===============

.. rst-class:: lead

    In order to use DVT's features, you must `obtain <https://eda.amiq.com/request-license>`_ and set the license.

The license must be passed to the application through one of the following **environment variables**:

-  ``DVT_LICENSE_FILE``
-  ``DVTLMD_LICENSE_FILE``
-  ``LM_LICENSE_FILE``

Environment variables will be read in the order above and the first non-empty value will be used, the others will be ignored. Any variable containing only the string "FLEXLM" (case-insensitive) will be ignored.

.. important::
    
    Environment variables **must be set before starting the application** and the application must inherit the variables (e.g. when setting the variables in a terminal the application must be started from the same terminal).

The license environment variable or setting value must contain one or more FlexLM license sources. **Supported license sources are**:

-  File-system path of a license file: ``/path/to/dvt.lic``
-  License server address as ``port@host: 27001@licsrv``
-  Three-server redundancy triad with comma (,) separated license servers: ``27001@licsrv1,27001@licsrv2,30001@licsrv3``
-  File-system path of a directory containing one or more license files with `.lic` extension: ``/path/to/lic_dir``
-  Multiline string with the content of a license file surrounded by three curly brackets: ``{{{...}}}``

Multiple license sources, with the exception of multiline string, can be specified by separating them with:

-  colon (:) on Linux/MacOS
-  semicolon (;) on Windows
-  ampersand (&) on any OS

.. note::

    If the host part of **port@host** is an IPv6 address then make sure to always include the **ampersand (&) separator** before or after even if there are no more license sources.

.. note::

    If the host part of **port@host** is resolved by DNS to both IPv6 and IPv4 addresses while the server is only IPv6 accessible then the application must be started with the **-Djava.net.preferIPv6Addresses=true** vmargs.

The license features are checked-out when a DVT project is opened. A license indicator is available in the application's bottom-right corner, selecting it will open the license log.

