code
code copied to clipboard
JAVA_TOOL_OPTIONS environment is passed down to Java
Please confirm the following.
- [X] I checked the existing issues for duplicate problems
- [X] I have tried resolving the issue using the support portal
- [X] I have ensured my Modrinth App installation is up to date
What version of the Modrinth App are you using?
0.8.7
What operating systems are you seeing the problem on?
Windows
Describe the bug
The app seems to pass down JAVA_TOOL_OPTIONS environment variable down when launching Java, which can cause issues similar to ones we had with _JAVA_OPTIONS environment variable when it has invalid values, like
- being unable to complete installation of recommended Java because
- being unable to install any modpack or create a new instance
- Java tests failing
- game not launching properly
Steps to reproduce
- Open command prompt.
- Execute
SET JAVA_TOOL_OPTIONS=-XmxBananzaM -x:meowmeow. - Drag Modrinth App executable into the window to insert its path and execute it as well.
- Test Java option in settings / Try installing recommended Java / Try creating a new modded instance.
(or otherwise define JAVA_TOOL_OPTIONS environment variable before launching Modrinth App and attempting step 4).
Expected behavior
The option is removed when Java is launched anywhere, similar to JAVA_OPTIONS, so it doesn't cause any issues.
Additional context
No response