Skip to main content
Version: 2.13 (deprecated)

jvm


Options for general JVM functionality.

JDK strings will be passed directly to Coursier's --jvm parameter. Run cs java --available to see a list of available JVM versions on your platform.

If the string 'system' is passed, Coursier's --system-jvm option will be used instead, but note that this can lead to inconsistent behavior since the JVM version will be whatever happens to be found first on the system's PATH.

Backend: pants.backend.experimental.java

Config section: [jvm]

Basic options

debug_args

--jvm-debug-args="['<str>', '<str>', ...]"
PANTS_JVM_DEBUG_ARGS
pants.toml
[jvm]
debug_args = [
'<str>',
'<str>',
...,
]
default: []

Extra JVM arguments to use when running tests in debug mode.

For example, if you want to attach a remote debugger, use something like ['-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005']

default_resolve

--jvm-default-resolve=<str>
PANTS_JVM_DEFAULT_RESOLVE
pants.toml
[jvm]
default_resolve = <str>
default: jvm-default

The default value used for the resolve and compatible_resolves fields.

The name must be defined as a resolve in [jvm].resolves.

resolves

--jvm-resolves="{'key1': val1, 'key2': val2, ...}"
PANTS_JVM_RESOLVES
pants.toml
[jvm.resolves]
key1 = val1
key2 = val2
...
default:
{
  "jvm-default": "3rdparty/jvm/default.lock"
}

A dictionary mapping resolve names to the path of their lockfile.

Advanced options

global_options

--jvm-global-options="['<str>', '<str>', ...]"
PANTS_JVM_GLOBAL_OPTIONS
pants.toml
[jvm]
global_options = [
'<str>',
'<str>',
...,
]
default: []

List of JVM options to pass to all JVM processes.

Options set here will be used by any JVM processes required by Pants, with the exception of heap memory settings like -Xmx, which need to be set using [GLOBAL].process_total_child_memory_usage and [GLOBAL].process_per_child_memory_usage.

jdk

--jvm-jdk=<str>
PANTS_JVM_JDK
pants.toml
[jvm]
jdk = <str>
default: temurin:1.11

The JDK to use.

This string will be passed directly to Coursier's --jvm parameter. Run cs java --available to see a list of available JVM versions on your platform.

If the string 'system' is passed, Coursier's --system-jvm option will be used instead, but note that this can lead to inconsistent behavior since the JVM version will be whatever happens to be found first on the system's PATH.

tool_jdk

--jvm-tool-jdk=<str>
PANTS_JVM_TOOL_JDK
pants.toml
[jvm]
tool_jdk = <str>
default: temurin:1.11

The JDK to use when building and running Pants' internal JVM support code and other non-compiler tools. See jvm help for supported values.

Deprecated options

None

None