The 'Could Not Create the Java Virtual Machine' error appears before the game even loads. The JVM initialization failed before any Minecraft code ran. Invalid JVM arguments in launcher settings are the most common cause — a typo or invalid flag stops the JVM from starting.
Check JVM arguments
In the Minecraft Launcher, go to Installations > Edit > More Options and check the JVM Arguments field for typos. Common mistakes: missing hyphen before flags, misspelled argument names (e.g., -Xmx4g vs -Xmx4G — the G must be uppercase in some JVMs), or unsupported flags.
Reduce RAM allocation
If -Xmx is set higher than your available RAM, the JVM cannot allocate that memory and fails to start. Reduce -Xmx to no more than 75% of your physical RAM.
How to fix step by step
- 1Open Minecraft Launcher > Installations > Edit > More Options > check JVM Arguments for typos or invalid flags
- 2Reduce -Xmx to a value within 75% of your physical RAM (e.g., -Xmx4G on an 8 GB system)
- 3Reset JVM Arguments to default by clearing the field and using the launcher's default
- 4Reinstall Java if the issue persists: uninstall, download the correct version (Java 17 for 1.17+), and reinstall
How COULD-NOT-CREATE-JVM differs from related codes
- Error EXIT-CODE-1: The Java Virtual Machine running Minecraft crashed and exited with code 1, indicating a fatal error. This is typically a Java or mod compatibility issue. (user-side)
- Error JAVA-HEAP-SPACE: Minecraft ran out of allocated Java heap memory. The JVM cannot allocate more objects because all configured RAM is used. This causes an immediate crash. (usually client-side)
- Error CRASH-REPORT: Minecraft's Java Virtual Machine (JVM) encountered a fatal error that could not be caught by the game. A crash-report or hs_err_pid log file was created containing the stack trace and error details. (usually client-side)