code
code copied to clipboard
_JAVA_OPTIONS not removed when testing JREs
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.
Steps to reproduce
- Have
_JAVA_OPTIONSenvironment variable defined to something like-Xmx0M, which apparently what it is set to for many users that have this variable set. - Start Modrinth App.
- Go to ⚙️ Settings, scroll down to Java settings, and press ▶️ Test next to any Java location field.
- 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).