debug: add -Xshare:off to JAVA_TOOL_OPTIONS to test fastutil classloader fix

Disables JVM Class Data Sharing when DualAuth agent is active.
May fix singleplayer crash (NoClassDefFoundError: fastutil) on some Windows systems
where appendToBootstrapClassLoaderSearch breaks CDS classloading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sanasol
2026-02-27 22:32:50 +01:00
parent 3abdd10cab
commit ce6455314d
2 changed files with 43 additions and 33 deletions

View File

@@ -488,8 +488,8 @@ async function launchGame(playerNameOverride = null, progressCallback, javaPathO
if (fs.existsSync(agentJar)) {
const agentFlag = `-javaagent:"${agentJar}"`;
env.JAVA_TOOL_OPTIONS = env.JAVA_TOOL_OPTIONS
? `${env.JAVA_TOOL_OPTIONS} ${agentFlag}`
: agentFlag;
? `${env.JAVA_TOOL_OPTIONS} ${agentFlag} -Xshare:off`
: `${agentFlag} -Xshare:off`;
console.log('DualAuth Agent: enabled via JAVA_TOOL_OPTIONS');
}