Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Fabric

Fix “Could Not Create the Java Virtual Machine” in Minecraft: Java Edition

Minecraft’s “Could Not Create the Java Virtual Machine” error happens before the game starts. Follow this no-data-loss sequence to reset Java options, memory, profiles, and modded installations.

By VGSources Team 7 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The message “Could not create the Java Virtual Machine” means Java failed before Minecraft: Java Edition could open. The usual causes are a bad JVM argument, an unrealistic -Xmx value, a global Java environment variable, an incompatible or 32-bit runtime, or a damaged profile. Back up your worlds, remove global Java overrides, reset the installation’s JVM arguments, then test a clean vanilla profile before changing mods or reinstalling anything.

First, capture the complete error

The headline is only a generic JVM startup failure. Copy the entire message, especially the line immediately after it. That line usually determines the repair:

Follow-up message Likely direction
Invalid maximum heap size Correct or lower -Xmx.
Could not reserve enough space for object heap Lower the allocation, close other applications, or use 64-bit Java.
Initial heap size set to a larger value than the maximum heap size Make -Xms no greater than -Xmx.
Unrecognized VM option Remove obsolete or copied JVM arguments.
UnsupportedClassVersionError Use the Java version required by that Minecraft version and loader.
The system cannot find the path specified Reset the selected Java executable or correct its path.

This is different from an out-of-memory crash during play: in that case the JVM started and Minecraft later exhausted heap or native memory. It is also different from a mod crash, where Java and the loader have already started.

Protect your worlds and identify the launch method

This guide targets Minecraft: Java Edition. Bedrock Edition on Windows uses a separate runtime and does not follow this Java launch process; the PC bundle contains both editions as separate games (Minecraft Help).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Minecraft - Bedrock Edition PS4
  • Play and share with friends on console, mobile and Windows 10
  • discover community creations in the new in-game store
  • access new mini games and game modes through servers

Before editing anything, note whether the failure affects vanilla, one version, Forge, Fabric, NeoForge, a modpack, Prism Launcher, another third-party launcher, or a server .jar. Back up the saves folder inside the relevant .minecraft directory. Do not delete the entire folder as a first step.

1. Remove global Java options on Windows

  1. Press Start and search for Edit the system environment variables.
  2. Open it and select Environment Variables.
  3. Check both User variables and System variables.
  4. Look for _JAVA_OPTIONS, JAVA_TOOL_OPTIONS, and JDK_JAVA_OPTIONS.
  5. Write down each value, then temporarily remove variables you do not need.
  6. Restart Windows and test Minecraft.

These variables inject options into Java programs globally. A value such as -Xmx512M, an invalid flag, or a setting intended for another application can conflict with Minecraft’s own command. Oracle documents the Java launcher environment-variable mechanism (Oracle Java launcher documentation). Do not “fix” this by adding _JAVA_OPTIONS=-Xmx1024M; that imposes a global limit and may be too small for modern or modded Minecraft. Configure memory in the Minecraft instance instead.

On macOS or Linux, inspect shell startup files and launcher settings for the same variables, then remove or comment out unneeded exports before retrying.

2. Reset JVM arguments in the official launcher

  1. Open Minecraft Launcher and select Minecraft: Java Edition.
  2. Open Installations.
  3. Find the affected installation, open its three-dot menu, and choose Edit.
  4. Open More Options and locate JVM Arguments.
  5. Copy the existing text to a backup file.
  6. Remove custom arguments, or restore the launcher’s defaults.
  7. Save and launch.

Minecraft’s official instructions use this path and recommend preserving the original field before editing (Minecraft Help: changing JVM arguments and memory).

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you must change memory, edit only the heap value first. -Xmx2G allows a maximum Java heap of 2 GB; -Xmx4G allows 4 GB. A configuration such as -Xms4G -Xmx2G cannot start because the initial heap is larger than the maximum. Avoid long “FPS boost” argument strings copied from unverified videos or forums.

Rank #2
Minecraft Playststion 3 Edition - PlayStation 3
  • Learn your way around one block at atime in the new tutorial mode
  • Craft all sorts of items from boats todiamond armor and create enormousstructures
  • Team up with friends in eight-playeronline multiplayer and four-player splitscreen modes

3. Choose a realistic memory allocation

-Xmx is only Minecraft’s Java heap, not all the RAM your computer needs. Windows, the launcher, browsers, drivers, recording software, and mods require memory too.

Installed RAM Vanilla starting point Modded starting point
4 GB -Xmx1G to -Xmx2G Large packs are generally unsuitable.
8 GB -Xmx2G to -Xmx3G Small packs only.
16 GB -Xmx3G to -Xmx6G Often adequate for moderate packs.
32 GB or more -Xmx4G to -Xmx8G Depends on the pack; do not allocate everything.

These are troubleshooting starting points, not requirements. Minecraft Help says systems with 4 GB or less should decrease allocation to 2 GB, while systems with 8 GB or more may be able to increase it; on 64-bit systems it generally advises staying around half of total RAM or less (official guidance). If the error says Java cannot reserve the heap, lower -Xmx rather than raising it.

A version-specific exception applies to Minecraft after 26.1-snapshot-2: Minecraft Help says its default allocation changed from 2 GB to 4 GB. Computers with less than 4 GB may need a manual reduction. This does not change the defaults for every stable release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Check Java’s version, path, and architecture

For a normal, current official launcher installation, you usually do not need to install Java separately; the launcher can manage its required runtime. Manual Java selection matters more for servers, old versions, custom launchers, and manually configured Forge or Fabric instances.

On Windows, open Command Prompt and run:

java -version
where java

The first command reports the version and vendor. The second shows which executable Windows finds first. A 32-bit runtime can impose severe memory limits, so use a 64-bit runtime when the operating system and Minecraft version support it.

Rank #3
Ravensburger Minecraft Heroes of The Village | Cooperative Board Game | Exciting & Unpredictable | Perfect for Families and Minecraft Enthusiasts | Suitable for Kids & Adults
  • ENGAGING AND COOPERATIVE: Experience the thrill of Minecraft in a unique and cooperative board game format. Perfect for teams of 2 to 4 players, the game encourages joint strategies and shared victories
  • EVER-CHANGING GAMEPLAY: With a map that changes every time you play, this game offers high replay value, making every game a unique and unpredictable experience
  • QUALITY COMPONENTS: The game includes 25 wooden blocks, 18 world tiles, 4 inventory boards, 6 player cards, 9 buildings, 12 mob tokens and more. All components are crafted with care to enhance your gaming experience
  • AGE-APPROPRIATE CHALLENGE: Aimed at ages 7 and up, this game offers a great balance of fun and challenge, making it a great choice for family game nights, parties, or gatherings
  • TRUSTED BRAND: With over 130 years of experience, Ravensburger ensures top quality games that stimulate the mind, engage the hands, and touch the heart

For manually configured instances, Prism Launcher documents these common mappings:

Minecraft version Common Java runtime
Before 1.17 Java 8
1.17 through 1.20.4 Java 17
1.20.5 and newer Java 21

These are not a universal “always use the newest Java” rule. Snapshots, Forge builds, mods, and older loaders can impose different requirements. See Prism Launcher’s Java installation guide for launcher-specific compatibility notes. Do not replace every installed Java version globally; assign the correct runtime per instance where the launcher allows it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Test a fresh installation profile

  1. In the official launcher, open Installations.
  2. Create a new installation for the same Minecraft version.
  3. Leave JVM arguments at their defaults.
  4. Do not add a custom Java path, mods, shaders, or resource packs.
  5. Launch the clean profile.

Minecraft recommends creating a new Java installation/profile when an existing installation is damaged (Minecraft launcher troubleshooting).

  • Fresh vanilla works: the original profile’s arguments, loader, mods, or runtime path is the likely cause.
  • Fresh vanilla fails: investigate global variables, launcher files, memory pressure, permissions, antivirus interference, or the operating system.
  • Only one version fails: focus on that version’s Java requirement and custom arguments.

6. Repair Forge, Fabric, NeoForge, and modpacks

  1. Launch the same Minecraft version without mods.
  2. If vanilla works, copy the modded instance before changing it.
  3. Remove custom JVM arguments and confirm the loader’s supported Java version.
  4. Test the loader with no mods.
  5. Add mods back in groups until the failing set is identified.

More heap cannot repair an incompatible loader, a 32-bit runtime, a malformed argument, a missing Java executable, or a mod built for another Minecraft version. Prism Launcher provides Java autodetection, supported-runtime downloads, a runtime test, and controls for memory and JVM arguments (Java setup; Java settings). Switching launchers can be a diagnostic test, not a requirement.

7. If you are launching a server .jar

Server startup is separate from the official client launcher. Run commands in the folder containing the server file:

Rank #4
Minecraft Dungeons: Hero Edition – Xbox Series X & Xbox One
  • Minecraft Dungeons Hero Edition includes the Hero Pass DLC content: a Hero Cape, two player skins, and a chicken pet. It also includes the Jungle Awakens and Creeping Winters DLC packs.
  • Dungeon Creeper Battle new-and-nasty mobs in this all-new action-adventure, inspired by classic dungeon crawlers.
  • Multiplayer Up to four players can team up and fight together in co-op mode.
  • Power Up Unlock dozens of unique items and weapon enchantments for devastating special attacks.
  • Options Personalize your character, then fight up-close and personal with melee swings, hang back with ranged attacks, or tank your way through swarms of mobs, by heavy armor
java -Xms1G -Xmx2G -jar server.jar nogui

Adjust the filename and memory only after checking the server’s requirements. If Java is not recognized, run where java and java -version. If a flag is rejected, remove custom options and test:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
java -jar server.jar nogui

Do not paste these server commands into the official launcher’s JVM Arguments field.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. Repair or reinstall the launcher without deleting worlds

Check launcher updates and security-software quarantine/history. Restore a quarantined file only when you have verified it belongs to the official launcher, and prefer reinstalling from the official launcher download options or Minecraft.net. Running the launcher as administrator is only a limited permissions test; it does not fix bad arguments, wrong Java versions, or excessive memory. Do not permanently disable antivirus protection.

Back up saves, screenshots, and any instance data before renaming or removing configuration folders. A fresh profile is safer than deleting .minecraft wholesale.

Choosing the right next step

Launcher choice Best for Trade-off
Official Minecraft Launcher Vanilla play and standard installations Less transparent Java management.
Prism Launcher Multiple instances, modpacks, Java selection, diagnostics Requires learning another interface.
Modpack-specific launcher Packs distributed through that ecosystem Adds another launcher and configuration layer.
Command line Servers and advanced users Easy to select the wrong Java or flags.

Frequently asked questions

Does Minecraft Java need a separate Java installation?

Usually not with a current official launcher, which can manage its own runtime. Servers, old versions, custom launchers, and manually selected runtimes are the main exceptions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
ThinkFun Minecraft Cave Adventure | Screen-Free Strategy Puzzle Game | 40 Logic Challenges | Ages 8+
  • Official Minecraft Puzzle Game – Hands-On Logic Game Based on the Best-Selling Video Game.
  • 40 Strategic Challenges – Use the Actions to Navigate & Solve Increasingly Tough Puzzles.
  • No Screens, Just Strategy – Promotes Problem-Solving with Off-Screen Minecraft Fun.
  • Perfect for Ages 8+ – Great Gift for Minecraft Fans Who Love a Challenge!
  • Trusted by Parents Worldwide – With Over 50 Million Sold, ThinkFun is the World's Leading Manufacturer of Brain Games and Mind-Challenging Puzzles!

Should I use Java 8, 17, or 21?

Match Java to the Minecraft version and loader. Common mappings are Java 8 before 1.17, Java 17 for 1.17–1.20.4, and Java 21 for 1.20.5 and newer, but individual mods and loaders can differ.

Will lowering RAM delete my worlds?

No. Changing -Xmx changes the JVM heap limit, not world files. Back up saves before broader file changes.

Why does vanilla work while Forge or Fabric fails?

The modded profile can have an incompatible loader, mod, Java runtime, custom argument, or missing executable path. Test the loader without mods, then add them back in groups.

Can I use Bedrock Edition instead?

Bedrock does not use this Java launch process, but changing editions is not a repair for a Java installation or modpack you intend to keep using.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What if the launcher itself will not open?

Check for launcher updates, security-software quarantine, and a damaged installation. Reinstall from Minecraft’s official download sources after backing up local data.

Quick Recap

Bestseller No. 1
Minecraft - Bedrock Edition PS4
Minecraft - Bedrock Edition PS4
Play and share with friends on console, mobile and Windows 10; discover community creations in the new in-game store
Bestseller No. 2
Minecraft Playststion 3 Edition - PlayStation 3
Minecraft Playststion 3 Edition - PlayStation 3
Learn your way around one block at atime in the new tutorial mode; Craft all sorts of items from boats todiamond armor and create enormousstructures
$16.62
Bestseller No. 4
Minecraft Dungeons: Hero Edition – Xbox Series X & Xbox One
Minecraft Dungeons: Hero Edition – Xbox Series X & Xbox One
Multiplayer Up to four players can team up and fight together in co-op mode.
$47.49
Bestseller No. 5
ThinkFun Minecraft Cave Adventure | Screen-Free Strategy Puzzle Game | 40 Logic Challenges | Ages 8+
ThinkFun Minecraft Cave Adventure | Screen-Free Strategy Puzzle Game | 40 Logic Challenges | Ages 8+
No Screens, Just Strategy – Promotes Problem-Solving with Off-Screen Minecraft Fun.; Perfect for Ages 8+ – Great Gift for Minecraft Fans Who Love a Challenge!
$24.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from Patch Notes

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.