Skip to content

Replace JAVA_OPTS variable with JAVA_TOOL_OPTIONS #13256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/enso4igv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
# Why do we subtract a number? Read versioning policy!
# https://github.com/enso-org/enso/pull/7861#discussion_r1333133490
echo "POM_VERSION=`mvn -q -DforceStdout help:evaluate -Dexpression=project.version | cut -f1 -d -`" >> "$GITHUB_ENV"
echo "MICRO_VERSION=`expr $GITHUB_RUN_NUMBER - 6930`" >> "$GITHUB_ENV"
echo "MICRO_VERSION=`expr $GITHUB_RUN_NUMBER - 8460`" >> "$GITHUB_ENV"

- name: Update project version
working-directory: tools/enso4igv
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@
[JavaScript](https://www.graalvm.org/javascript/) and
[Python](https://www.graalvm.org/python/)) to version `24.2.0`.
- [Upgrade GraalVM from JDK 21 to JDK 24][12855]
- [Use JAVA_TOOL_OPTIONS env variable to alter JVM arguments][13256]

[12500]: https://github.com/enso-org/enso/pull/12500
[12976]: https://github.com/enso-org/enso/pull/12976
[12855]: https://github.com/enso-org/enso/pull/12855
[12905]: https://github.com/enso-org/enso/pull/12905
[13225]: https://github.com/enso-org/enso/pull/13225
[13256]: https://github.com/enso-org/enso/pull/13256

# Enso 2025.1

Expand Down
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4329,7 +4329,8 @@ lazy val `os-environment` =
val exeFile =
(Test / target).value / ("test-os-env" + exeSuffix)
val binPath = exeFile.getAbsolutePath
val res = Process(Seq(binPath), None, "JAVA_OPTS" -> "") ! logger
val res =
Process(Seq(binPath), None, "JAVA_TOOL_OPTIONS" -> "") ! logger
if (res != 0) {
logger.error("Some test in os-environment failed")
throw new TestsFailedException()
Expand Down
7 changes: 5 additions & 2 deletions build_tools/build/src/enso.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl From<bool> for Boolean {
}

ide_ci::define_env_var! {
JAVA_OPTS, String;
JAVA_TOOL_OPTIONS, String;
ENSO_BENCHMARK_TEST_DRY_RUN, Boolean;
}

Expand Down Expand Up @@ -131,7 +131,10 @@ impl BuiltEnso {
.arg(test_path.as_ref())
// This flag enables assertions in the JVM. Some of our stdlib tests had in the past
// failed on Graal/Truffle assertions, so we want to have them triggered.
.set_env(JAVA_OPTS, &ide_ci::programs::java::Option::EnableAssertions.as_ref())?;
.set_env(
JAVA_TOOL_OPTIONS,
&ide_ci::programs::java::Option::EnableAssertions.as_ref(),
)?;

for (k, v) in environment_overrides {
command.env(k, &v);
Expand Down
3 changes: 1 addition & 2 deletions distribution/bin/enso
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
COMP_PATH=$(dirname "$0")/../component

JAVA_OPTS="--enable-native-access=org.graalvm.truffle --sun-misc-unsafe-memory-access=allow --add-opens=java.base/java.nio=ALL-UNNAMED $JAVA_OPTS"
JAVA_OPTS="--enable-native-access=org.graalvm.truffle --sun-misc-unsafe-memory-access=allow --add-opens=java.base/java.nio=ALL-UNNAMED"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That changes the behavior slightly but I understand why it is done this way.

exec java --module-path $COMP_PATH $JAVA_OPTS -m org.enso.runner/org.enso.runner.Main "$@"
exit
4 changes: 2 additions & 2 deletions distribution/bin/enso.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set comp-dir=%~dp0\..\component
set JAVA_OPTS=%JAVA_OPTS% --enable-native-access=org.graalvm.truffle --sun-misc-unsafe-memory-access=allow --add-opens=java.base/java.nio=ALL-UNNAMED
java --module-path %comp-dir% -Dpolyglot.compiler.IterativePartialEscape=true %JAVA_OPTS% -m org.enso.runner/org.enso.runner.Main %*
set java-opts=-Dpolyglot.compiler.IterativePartialEscape=true --enable-native-access=org.graalvm.truffle --sun-misc-unsafe-memory-access=allow --add-opens=java.base/java.nio=ALL-UNNAMED
java --module-path %comp-dir% %java-opts% -m org.enso.runner/org.enso.runner.Main %*
exit /B %errorlevel%
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ To run with a debugger first start the debugger listening on 5005, add a
breakpoint in a test then run with

```bash
JAVA_OPTS='-agentlib:jdwp=transport=dt_socket,server=n,address=5005' enso --run test/Base_Tests/src/Data/Time/Duration_Spec.enso
JAVA_TOOL_OPTIONS='-agentlib:jdwp=transport=dt_socket,server=n,address=5005' enso --run test/Base_Tests/src/Data/Time/Duration_Spec.enso
```

The Database tests will by default only test the SQLite backend, to test other
Expand All @@ -510,7 +510,7 @@ LANG=C enso --run test/Base_Tests
```

Note that JVM assertions are not enabled by default, one has to pass `-ea` via
`JAVA_OPTS` environment variable. There are also Enso-specific assertions
`JAVA_TOOL_OPTIONS` environment variable. There are also Enso-specific assertions
(method `Runtime.assert`) that can be enabled when `ENSO_ENABLE_ASSERTIONS`
environment variable is set to "true". If JVM assertions are enable, Enso
assertions are enabled as well.
Expand Down
4 changes: 2 additions & 2 deletions docs/debugger/chrome-devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ the rest of the environment.

## Tips and tricks

- Use `env JAVA_OPTS=-Dpolyglot.inspect.Path=enso_debug` to set the chrome to
use a fixed URL. In this case the URL is
- Use `env JAVA_TOOL_OPTIONS=-Dpolyglot.inspect.Path=enso_debug` to set the
chrome to use a fixed URL. In this case the URL is
`devtools://devtools/bundled/js_app.html?ws=127.0.0.1:9229/enso_debug`
2 changes: 1 addition & 1 deletion docs/debugger/dap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ protocol for VSCode and as such, works only via VSCode. To start Enso with DAP
server waiting for a client to attach, launch enso via:

```
env JAVA_OPTS='-Dpolyglot.dap' ./built-distribution/enso-engine-*/enso-*/bin/enso --run *.enso
env JAVA_TOOL_OPTIONS='-Dpolyglot.dap' ./built-distribution/enso-engine-*/enso-*/bin/enso --run *.enso
```

Once DAP server is started and ready for a client to be attached, the following
Expand Down
8 changes: 4 additions & 4 deletions docs/debugger/runtime-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ sbt:enso> runEngineDistribution --debug --run ./test/Base_Tests/src/Data/Numbers
```

The second options gives one a complete control as it launches everything from a
command line. By specifying `JAVA_OPTS` environment variable one influences the
special JVM arguments when launching the `bin/enso` from the engine
distribution:
command line. By specifying `JAVA_TOOL_OPTIONS` environment variable one
influences the special JVM arguments when launching the `bin/enso` from the
engine distribution:

```bash
enso$ JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=n,address=5005 ./built-distribution/enso-engine-*/enso-*/bin/enso --run ./test/Base_Tests/src/Data/Numbers_Spec.enso
enso$ JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=n,address=5005 ./built-distribution/enso-engine-*/enso-*/bin/enso --run ./test/Base_Tests/src/Data/Numbers_Spec.enso
```

Both of the approaches launch the JVM in a _debug mode_. Once the JVM is
Expand Down
7 changes: 4 additions & 3 deletions docs/infrastructure/native-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Note that for convenience, you can run the launcher/engine runtime via
`bin/enso`, e.g.

```bash
env JAVA_OPTS="-agentlib:native-image-agent=config-merge-dir=./engine/runner/src/main/resources/META-INF/native-image/org/enso/runner" ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run tmp.enso
env JAVA_TOOL_OPTIONS="-agentlib:native-image-agent=config-merge-dir=./engine/runner/src/main/resources/META-INF/native-image/org/enso/runner" ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run tmp.enso
```

The command may need to be re-run with different arguments to ensure that all
Expand Down Expand Up @@ -293,10 +293,11 @@ $ ENSO_JAVA=espresso ./built-distribution/enso-engine-*/enso-*/bin/enso --run he
Unless you see a warning containing _"No language for id java found."_ your code
has just successfully been executed by
[Espresso](https://www.graalvm.org/jdk17/reference-manual/java-on-truffle/)! To
debug just add `JAVA_OPTS` environment variable set to your IDE favorite value:
debug just add `JAVA_TOOL_OPTIONS` environment variable set to your IDE favorite
value:

```bash
$ JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=5005 ENSO_JAVA=espresso enso --run hello.enso
$ JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=5005 ENSO_JAVA=espresso enso --run hello.enso
```

Espresso support works also with
Expand Down
4 changes: 2 additions & 2 deletions docs/runtime-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ order: 7
affect overall performance of your program. You can tell runner to generate
compilation traces via additional options:
```
JAVA_OPTS="-Dpolygot.engine.TracePerformanceWarnings=all -Dpolyglot.engine.TraceTransferToInterpreter=true -Dpolyglot.engine.TraceDeoptimizeFrame=true -Dpolyglot.engine.TraceCompilation=true -Dpolyglot.engine.TraceCompilationDetails=true"
JAVA_TOOL_OPTIONS="-Dpolygot.engine.TracePerformanceWarnings=all -Dpolyglot.engine.TraceTransferToInterpreter=true -Dpolyglot.engine.TraceDeoptimizeFrame=true -Dpolyglot.engine.TraceCompilation=true -Dpolyglot.engine.TraceCompilationDetails=true"
```
Make sure you print trace logs by using `--log-level TRACE`.
11. Occasionally a piece of code runs slower than we anticipated. Analyzing
Expand All @@ -113,7 +113,7 @@ order: 7
the performance. You can tell runner to generate inlining traces via
additional options:
```
JAVA_OPTS="-Dpolyglot.engine.TraceInlining=true -Dpolyglot.engine.TraceInliningDetails=true"
JAVA_TOOL_OPTIONS="-Dpolyglot.engine.TraceInlining=true -Dpolyglot.engine.TraceInliningDetails=true"
```
Make sure you print trace logs by using `--log-level TRACE`. See
[documentation](https://www.graalvm.org/22.2/graalvm-as-a-platform/language-implementation-framework/Inlining/#call-tree-states)
Expand Down
6 changes: 3 additions & 3 deletions docs/runtime/compiler-ir.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ to how GraalVM graphs are dumped, which is documented in

When using the `enso.compiler.dumpIr` property, one has to add
`--add-exports jdk.graal.compiler/jdk.graal.compiler.graphio=org.enso.runtime.compiler.dump.igv`
to the `JAVA_OPTS` env var, because the IGV dumper uses an internal package of
GraalVM JDK's module which is not exported by default.
to the `JAVA_TOOL_OPTIONS` env var, because the IGV dumper uses an internal
package of GraalVM JDK's module which is not exported by default.

Usage example:

```
$ env JAVA_OPTS='--add-exports jdk.graal.compiler/jdk.graal.compiler.graphio=org.enso.runtime.compiler.dump.igv -Denso.compiler.dumpIr=Vector' ./built-distribution/*/bin/enso --no-ir-caches --run tmp.enso
$ env JAVA_TOOL_OPTIONS='--add-exports jdk.graal.compiler/jdk.graal.compiler.graphio=org.enso.runtime.compiler.dump.igv -Denso.compiler.dumpIr=Vector' ./built-distribution/*/bin/enso --no-ir-caches --run tmp.enso
```

The IR graphs are dumped directly to IGV, if it is running, or to the `ir-dumps`
Expand Down
2 changes: 1 addition & 1 deletion docs/types/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ of their own creation - e.g. where `Error.throw` has happened. Shall that not be
enough, one can run with `-ea` flag, like:

```bash
enso$ JAVA_OPTS=-ea ./built-distribution/enso-engine-*/enso-*/bin/enso --run x.enso
enso$ JAVA_TOOL_OPTIONS=-ea ./built-distribution/enso-engine-*/enso-*/bin/enso --run x.enso
```

to get full stack where the _broken value_ has been created. Collecting such
Expand Down
22 changes: 10 additions & 12 deletions engine/runner/src/main/java/org/enso/runner/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1433,21 +1433,19 @@ private boolean isJvmModeEnabled(CommandLine line) {
}

private void launchJvm(
CommandLine line, Map<String, String> props, File component, File javaExecutable)
String originalCwdOrNull,
CommandLine line,
Map<String, String> props,
File component,
File javaExecutable)
throws IOException, InterruptedException {
var useJNI = true;
var commandAndArgs = new ArrayList<String>();
if (originalCwdOrNull != null) {
Copy link
Member Author

@JaroslavTulach JaroslavTulach Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only set enso.user.dir when originalCwdOrNull is non-null. The problem mentioned here cannot happen, @4e6, I hope.

commandAndArgs.add("-Denso.user.dir=" + originalCwdOrNull);
}
if (!useJNI) {
commandAndArgs.add(javaExecutable.getPath());
var jvmOptions = System.getenv("JAVA_OPTS");
if (jvmOptions != null) {
for (var op : jvmOptions.split(" ")) {
if (op.isEmpty()) {
continue;
}
commandAndArgs.add(op);
}
}
}
var assertsOn = false;
assert assertsOn = true;
Expand Down Expand Up @@ -1561,11 +1559,11 @@ private void launch(String[] args) throws IOException, InterruptedException, URI
throw exitFail("Cannot find java executable");
}
} else {
launchJvm(line, props, component, javaExe);
launchJvm(originalCwdOrNull, line, props, component, javaExe);
}
} else {
var javaExecutable = new File(new File(new File(jvm), "bin"), "java").getAbsoluteFile();
launchJvm(line, props, component, javaExecutable);
launchJvm(originalCwdOrNull, line, props, component, javaExecutable);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion engine/runner/src/main/java/org/enso/runner/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private static <S> void printFrame(
static String adjustCwdToProject(String fileToRun) {
assert fileToRun != null;
if (!ImageInfo.inImageRuntimeCode()) {
return null;
return System.getProperty("enso.user.dir");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • the 17e2200 change is unrelated to _JAVA_OPTIONS changed
  • but while testing various combinations of launcher I found out that
  • with native image enso launcher the following execution fails:
  • sbt:enso> runEngineDistribution --jvm --run test/Base_Tests
  • saying it cannot find test/Base_Tests project
  • the problem is that the NI part
    • properly resolves the project
    • changes CWD to the test directory
    • invokes the JVM main
  • however the CWD for the JVM part is already test directory
  • and resolving test/Base_Tests in that directory doesn't work
  • this change fixes the problem by providing the JVM part the location of the original CWD via a property

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You set enso.user.dir with

commandAndArgs.add("-Denso.user.dir=" + originalCwdOrNull);

meaning that it can be -Denso.user.dir=null. And then when you get the property here, doesn't it return the "null" string?

}
var nativeApi = WorkingDirectory.getInstance();
var projectRoot = nativeApi.findProjectRoot(fileToRun);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ public static JVM create(File javaHome, String... options) {
// java.home
jvmArgs.add("-Djava.home=" + javaHome);

var jvmOptions = System.getenv("JAVA_OPTS");
Copy link
Member Author

@JaroslavTulach JaroslavTulach Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • removal of this JAVA_OPTS handling is possible because the _JAVA_OPTIONS are "standard" JVM variables
  • we don't need to pass them around ourselves
  • the HotSpot JVM will pick them automatically up once it starts
  • it is small benefit, but it is a simplification of the code

if (jvmOptions != null) {
for (var op : jvmOptions.split(" ")) {
if (op.isEmpty()) {
continue;
}
jvmArgs.add(op);
}
}
jvmArgs.addAll(Arrays.asList(options));
return new JVM(createJvmFn, jvmArgs.toArray(new String[0]));
}
Expand Down
4 changes: 2 additions & 2 deletions project/DistributionPackage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ object DistributionPackage {
val runningProcess = Process(
command,
Some(path.getAbsoluteFile.getParentFile),
"JAVA_OPTS" -> "-Dorg.jline.terminal.dumb=true"
"JAVA_TOOL_OPTIONS" -> "-Dorg.jline.terminal.dumb=true"
).run
// Poor man's solution to stuck index generation
val GENERATING_INDEX_TIMEOUT = 60 * 4 // 2 minutes
Expand Down Expand Up @@ -380,7 +380,7 @@ object DistributionPackage {

all.add(enso.getAbsolutePath)
all.addAll(args.asJava)
reduceArgs(all, "JAVA_OPTS", pb.environment)
reduceArgs(all, "JAVA_TOOL_OPTIONS", pb.environment)
if (disablePrivateCheck) {
all.add("--disable-private-check")
}
Expand Down
4 changes: 2 additions & 2 deletions test/Base_Tests/src/Runtime/Stack_Size_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ generate_code nesting_level:Integer -> Text =
The thread stack size is also set to a sufficiently large value
to ensure there is no StackOverflow.
run_without_compiler enso_args:Vector -> Process_Result =
java_opts = "-Dpolyglot.engine.Compilation=false "
JAVA_TOOL_OPTIONS = "-Dpolyglot.engine.Compilation=false "
+ "-XX:MaxJavaStackTraceDepth=18000 "
+ "-Xms16M"
args = ["JAVA_OPTS="+java_opts, enso_bin.path] + enso_args
args = ["JAVA_TOOL_OPTIONS="+JAVA_TOOL_OPTIONS, enso_bin.path] + enso_args
Process.run "env" (args + enso_args)


Expand Down
4 changes: 2 additions & 2 deletions tools/ci/docker/engine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG RPC_PORT=30001
ARG DATA_PORT=30002
ARG YDOC_PORT=1234
ARG PRINT_VERSION=0
ARG JAVA_OPTS="-XX:MaxRAMPercentage=90.0 -XX:InitialRAMPercentage=90.0"
ARG JAVA_TOOL_OPTIONS="-XX:MaxRAMPercentage=90.0 -XX:InitialRAMPercentage=90.0"
ARG PROFILING_FILENAME
ARG PROFILING_TIME
ARG ENSO_LAUNCHER
Expand Down Expand Up @@ -65,7 +65,7 @@ ENV DATA_PORT=${DATA_PORT}
ENV YDOC_PORT=${YDOC_PORT}
ENV LOG_LEVEL=${LOG_LEVEL}
ENV PRINT_VERSION=${PRINT_VERSION}
ENV JAVA_OPTS=${JAVA_OPTS}
ENV JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}
ENV ENSO_LAUNCHER=${ENSO_LAUNCHER}

EXPOSE ${RPC_PORT}
Expand Down
4 changes: 2 additions & 2 deletions tools/enso4igv/IGV.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Build an instance of the Enso runtime engine (see
it the following system properties:

```bash
enso$ env JAVA_OPTS='-Dgraal.Dump=Truffle:2 -Dgraal.PrintGraph=File' ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run yourprogram.enso
enso$ env JAVA_TOOL_OPTIONS='-Dgraal.Dump=Truffle:2 -Dgraal.PrintGraph=File' ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run yourprogram.enso
```

See
Expand All @@ -80,7 +80,7 @@ which computes hundred thousand of prime numbers repeatedly and measures time of
each round. Download the file and launch Enso with:

```bash
enso$ env JAVA_OPTS='-Dgraal.Dump=Truffle:2 -Dgraal.PrintGraph=File' ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run yourprogram.enso
enso$ env JAVA_TOOL_OPTIONS='-Dgraal.Dump=Truffle:2 -Dgraal.PrintGraph=File' ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run yourprogram.enso
```

Bunch of files in `graal_dumps/*` subdirectory is going to be generated:
Expand Down
2 changes: 1 addition & 1 deletion tools/enso4igv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>enso4igv</artifactId>
<packaging>nbm</packaging>
<name>Enso Language Support for NetBeans &amp; Ideal Graph Visualizer</name>
<version>1.42-SNAPSHOT</version>
<version>1.43-SNAPSHOT</version>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void invokeAction(String action, Lookup lkp) throws IllegalArgumentExcept
if (isGraalVM && info.igvMode()) {
if (info.networkOn()) {
env.setVariable("JAVA_OPTS", info.toJavaOptions());
env.setVariable("JAVA_TOOL_OPTIONS", info.toJavaOptions());
} else {
var icon = ImageUtilities.loadImageIcon("org/enso/tools/enso4igv/enso.svg", false);
var note = new Notification[1];
Expand Down Expand Up @@ -237,6 +238,7 @@ static final class DebugAndLaunch implements Callable<Process> {
public Process call() throws Exception {
var port = computeAddress.get();
builder.getEnvironment().setVariable("JAVA_OPTS", "-agentlib:jdwp=transport=dt_socket,address=" + port);
builder.getEnvironment().setVariable("JAVA_TOOL_OPTIONS", "-agentlib:jdwp=transport=dt_socket,address=" + port);
return builder.call();
}

Expand Down
Loading