Relauncher: Seamless JVM Restart for Minecraft
Every seasoned Minecraft player knows the drill: squeezing every frame out of your game means diving into launcher settings, tweaking garbage collector flags, and wrestling with memory allocation. It is a necessary evil, but what if the game itself could handle that heavy lifting? Enter Relauncher: Seamless JVM Restart for Minecraft, a compact yet formidable library that quietly transforms how Java arguments are applied. Instead of manually editing launch profiles, this mod restarts the game process with your desired flags automatically, and it does so in a way that feels completely invisible to you.
The Core Idea: Why Restart the JVM at All?
Think about a scenario where you have assembled a sprawling modpack, but a few mods demand specific Java settings that are awkward to configure across different launchers. Or perhaps your mod needs to inject a javaagent dynamically after dependencies are resolved. Relauncher: Seamless JVM Restart for Minecraft handles this by triggering a JVM restart at the very earliest stage of game loading, before the main game state is initialized. From the perspective of your external launcher, the process appears continuous—no extra windows pop up, no orphaned processes linger in the background. You simply click play, and the magic happens under the hood.
Broad Compatibility: Versions and Loaders
One of the standout features of this tool is its staggering range of support. It functions across Java versions 8 through 25 and runs smoothly on Linux, Windows, and macOS, covering both x86_64 and aarch64 architectures. When it comes to mod loaders, the list is genuinely impressive:
- Forge (LaunchWrapper) for versions 1.6.4 through 1.12.2
- Forge (ModLauncher) via ITweaker for 1.13.2 and newer
- NeoForge (ModLauncher) up to 1.21.1 through SPI
- NeoForge (FancyModLoader) for 1.21.3+ using IModFileCandidateLocator
- Fabric for 1.14+ with PreLaunchEntrypoint
- Quilt, which leverages the Fabric entry point
- Hytale Server, usable as an early or standard plugin
This flexibility makes Relauncher: Seamless JVM Restart for Minecraft an essential asset for mod developers aiming to deliver a consistent experience across diverse environments.
Getting Started: Installation and Initial Setup
Installation is refreshingly straightforward. You can download Relauncher: Seamless JVM Restart for Minecraft as a universal JAR file, typically named relauncher-universal-<version>.jar, and simply drop it into your mods/ folder. On the first launch, the mod generates a configuration file at config/relauncher/config.cfg. For those using the foxygame.net launcher, the process is even more streamlined, as it allows direct mod installation from its menu, eliminating the need to manually copy JAR files. Just run the game once to generate the config, and you are set.
Configuring Your JVM Arguments
The config.cfg file is designed for clarity. You can list any additional JVM arguments, one per line. Comments are marked with a # symbol, and empty lines are ignored. The critical parameter, enabled = true, controls only the arguments specified in this file. If another mod provides a CommandLineProvider implementation, a restart will occur regardless of this flag. A typical configuration might look like this:
# Relauncher Configuration enabled = true -XX:+UseG1GC -XX:+AlwaysPreTouch -Dsome.java.property=true
This setup allows you to enable experimental garbage collectors like ZGC or set system properties without ever touching your launcher settings.
Launcher Compatibility and Known Caveats
Relauncher: Seamless JVM Restart for Minecraft works flawlessly with most popular launchers, including Vanilla, PrismLauncher, CurseForge, Modrinth, and ATLauncher. The one notable exception is MultiMC, which relies on a stdin protocol that cannot be replicated after a restart. In such cases, the mod logs a clear warning and skips the restart. If you encounter this, your best bet is to switch launchers or manually add the desired JVM arguments.
Under the Hood: How the Restart Works
The library employs three restart strategies, ordered by preference. On Linux and macOS, it uses a native POSIX exec via a Rust library, replacing the process in place with the same PID for zero overhead. On Windows, a DLL is loaded that spawns a child process at JVM shutdown, duplicating stdin, stdout, and stderr. If native methods are unavailable, a pure Java fallback using ProcessBuilder and waitFor kicks in—it is universal but leaves the original process running for the session's duration. Keep in mind that the CurseForge edition excludes native libraries due to platform policy, so on Windows, manual addition of natives may be necessary for precise command-line reconstruction.
Developer-Friendly API
For mod creators, Relauncher: Seamless JVM Restart for Minecraft is a dream. The core API is published on Maven Central; just add compileOnly 'com.juanmuscaria:relauncher-core:<version>' to your dependencies. Triggering a restart programmatically is a single line: Relauncher.relaunch(extraArgs). If the restart fails, the method returns a RelaunchResult object with a clear explanation. For deeper integration, implement the CommandLineProvider interface and register it via ServiceLoader—Relauncher will scan your mods folder and pick up your arguments before the mod even loads. You can check restart status with Relauncher.isRelaunched() and Relauncher.getDepth(), while the -Drelauncher.debug=true flag provides a detailed log of the entire process, invaluable for debugging.
Final Thoughts
Relauncher: Seamless JVM Restart for Minecraft is a small but meticulously crafted library that removes the headache of managing JVM parameters for both players and modders. It operates silently, supports virtually every Minecraft version and loader imaginable, and offers a clean API for developers. Whether you are fine-tuning garbage collection, automating javaagent installation, or simply keeping your configuration within the modpack, this tool handles it elegantly and reliably. If you are serious about modding or just want to maximize your setup's performance, this instrument absolutely deserves a spot in your mods folder. For those ready to take the plunge, the process to download Relauncher: Seamless JVM Restart for Minecraft is simple, and knowing how to install it is as easy as copying a file. Relauncher: Seamless JVM Restart for Minecraft for Minecraft is the quiet upgrade your game has been waiting for.