# Runtime environment

This topic outlines how to set particular parameters required by your application using JVM environment variables, project environment variables, or system properties.

## JVM environment variables

If your project requires any particular JVM options to, these can be passed to Cover using the `JVM_ARGS` environment variable. This is useful if you need to pass the details of a user id, or which database to use, as properties to the JVM. The two examples below show passing a user\_id with an authentication token:

{% tabs %}
{% tab title="Windows" %}

```
set JVM_ARGS="-Duser_id=Sue -Duser_auth_token=1234"
dcover.bat create
```

{% endtab %}

{% tab title="Linux/macOS" %}

```
export JVM_ARGS="-Duser_id=Sue -Duser_auth_token=1234"
dcover create
```

{% endtab %}
{% endtabs %}

The `JVM_ARGS` environment variable can also be used for [memory management](/features/cover-cli/cover-cli-admin/memory-management.md).

## Project environment variables

Any environment variables that your project requires at runtime should be set in the environment in which you are running Cover. If this is not possible then the `--environment KEY=VALUE` command line option can be used to configure additional environment variables.

Note that if tests are created using environment variables you should ensure that those same environment variables are available to test execution. Therefore you may need to configure your build tool (`Maven`, `Gradle`) to supply your environment variables to your tests.

## System properties

The `-D` or `--define` option allows the user to pass additional system properties to `dcover` for test creation and execution.

Any created tests *may* depend upon these user-specified system properties and *may not* execute successfully without them.

Therefore you will need to configure test execution in your build script to supply any user-specified system properties when executing those tests outside `dcover`.

For more details about build tool configuration with system properties, see the [Maven](/features/cover-cli/project-configuration/compiling-your-project/building-a-maven-project.md#maven-and-user-specified-system-properties) and [Gradle](/features/cover-cli/project-configuration/compiling-your-project/building-a-gradle-project.md#gradle-and-user-specified-system-properties) topics.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cover-docs-preview.diffblue.com/features/cover-cli/project-configuration/runtime-environment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
