code icon indicating copy to clipboard operation
code copied to clipboard

_JAVA_OPTIONS not removed when testing JREs

Open brawaru opened this issue 1 year ago • 0 comments

Describe the bug

In 0.7.0 Modrinth App started removing _JAVA_OPTIONS when launching the game. However, this variable is never removed when testing JREs in settings.

A cascade of “Could not create the Java Virtual Machine.” error messages.

Steps to reproduce

  1. Have _JAVA_OPTIONS environment variable defined to something like -Xmx0M, which apparently what it is set to for many users that have this variable set.
  2. Start Modrinth App.
  3. Go to ⚙️ Settings, scroll down to Java settings, and press ▶️ Test next to any Java location field.
  4. Observe the ‘Could not create the Java Virtual Machine.’ error.

Expected behavior

The evil _JAVA_OPTIONS environment variable is removed even when testing JREs.

System information

Universal, Modrinth App 0.7.1.

Additional context

ICOM-3367 (likely related).

brawaru avatar May 04 '24 10:05 brawaru