What the error means
Forge and NeoForge do not start Minecraft directly. They start ModLauncher, which loads the mod loader and then hands over to a named launch target. The server's start arguments name the target, and ModLauncher looks for it among the launch handlers that the loader's own library jars provide. When none has that name, it logs the line and stops before the Minecraft server starts, so nothing in your world was loaded or changed.
| Target in the message | Where that name comes from |
|---|---|
| forgeserver | Forge 1.17 to 1.20.1 servers started with run.sh or run.bat, and NeoForge for Minecraft 1.20.4 to 1.21.3. |
| neoforgeserver | NeoForge for Minecraft 1.21.4 and later (we checked its loader up to 1.21.8). |
| fmlserver | Forge for Minecraft 1.13 to 1.16.5, written into the forge jar its installer creates. |
| fmlclient or forgeclient | The game client's target, not a server's. A client launcher has the problem, not your server. |
| forgeserveruserdev | A mod development environment's target. A server never needs it. |
The usual reasons the target is missing:
- The libraries folder is incomplete: the server was uploaded without all of libraries/, or an install stopped part way.
- The start script or command belongs to another install: an old run.sh, a java command copied from a guide, or a forge jar left from an earlier version.
- The loader was updated or changed without rerunning its installer, so the argument file and the libraries come from different versions.
- For the @ form of the message: Java 8 is running a start script that uses argument files.
Exact error messages
Search the console for these lines. The first four come from ModLauncher; the last comes from Java itself, before ModLauncher runs.
| Exact line in the log | What it tells you |
|---|---|
| Cannot find launch target forgeserver, unable to launch | ModLauncher was asked for forgeserver and no loaded launch handler has that name. |
| Exception in thread "main" java.lang.RuntimeException: Cannot find launch target | The exception thrown right after that line. The stack trace under it points at the launcher, not at a mod. |
| Cannot find launch target neoforgeserver, unable to launch | The same failure on NeoForge for Minecraft 1.21.4 and later. |
| Cannot find launch target fmlserver, unable to launch | The same failure on Forge for Minecraft 1.13 to 1.16.5. |
| Error: Could not find or load main class @user_jvm_args.txt | Java 8 ran a start script that uses argument files, and read the file name as a class to start. |
How to fix it on Forge 1.17 to 1.20.1 and NeoForge
These installs start from argument files. The installer writes run.sh and run.bat in the server folder, user_jvm_args.txt for your memory settings, and unix_args.txt and win_args.txt inside the loader's own version folder in libraries/, such as libraries/net/minecraftforge/forge/<version>/ or libraries/net/neoforged/neoforge/<version>/. run.sh starts Java with @user_jvm_args.txt followed by that unix_args.txt.
- Find the exact Forge or NeoForge version the pack needs. The pack's server files or its manifest usually name it.
- Run that version's installer in the server folder with its server install: java -jar <installer>.jar --installServer. If you install on your own computer, upload the whole result, including all of libraries/.
- Check that libraries/ now holds the loader's version folder with unix_args.txt and win_args.txt in it.
- Start the server with the run.sh (Linux) or run.bat (Windows) that this installer just wrote, not a script or java command from an older install or another guide.
- Put memory and other Java settings in user_jvm_args.txt rather than editing run.sh.
- If the console says Could not find or load main class @user_jvm_args.txt, the server is running on Java 8, which does not read argument files. Minecraft 1.18 to 1.20.4 needs Java 17, 1.20.5 to 1.21.11 needs Java 21, and 26.1 and newer need Java 25.
Tip
Updating Forge or NeoForge? Run the new version's installer in the same folder so the start scripts and argument files match the new libraries. NeoForge's own instructions say to back up your world before updating the loader or mods.
Not sure which Java your Minecraft version needs? The lookup lists it per version.
Look up the Java versionHow to fix it on Forge 1.16.5 and older
Forge for Minecraft 1.13 to 1.16.5 has no argument files. Its installer writes a forge-<minecraft>-<forge>.jar at the top of the server folder, and that jar carries both the fmlserver target and the list of library jars it loads from libraries/.
- Start that jar with -jar, for example java -jar forge-1.16.5-<version>.jar. Not the installer jar and not the vanilla minecraft_server jar.
- Keep the libraries folder the installer created next to it.
- If libraries/ is missing or came from a different Forge version, run the installer for that exact version again in the server folder: java -jar <installer>.jar --installServer.
- If several forge jars sit in the folder, move the ones from other versions out so the command starts the one that matches libraries/.
When the jar finds ModLauncher itself missing, it prints FATAL ERROR, You need to run the installer instead. The fix is the same.
Note
Forge for Minecraft 1.12.2 and older does not use ModLauncher, so it never prints this message. On those versions a [LaunchWrapper]: Unable to launch line means a tweaker failed during start-up, usually one a mod registers, and the first frames of the stack trace under it name the class and jar that failed.
If Java cannot find the start script or jar at all, the message is different: Unable to access jarfile.
Read the Unable to access jarfile guideWhat MineXHost's launcher does with this crash
On MineXHost you do not install the loader or write a start command. MineXEngine, our launcher, installs the loader the pack needs and starts it from the argument file or jar that install created. Before each start it checks two things. If the libraries folder is missing and a Forge or NeoForge installer is in the server folder, it runs that installer's server install. If a Forge argument file sits at the top of the server folder while most mods are Fabric or Quilt mods, it moves the Forge launch files into a dated folder under .mx-quarantine, so a Fabric pack is not started as Forge.
When Cannot find launch target, or the @ form of Could not find or load main class, still appears, the engine treats it as a broken loader install and repairs the loader, not your mods. If most mods are Fabric or Quilt mods and no Forge or NeoForge install is present, it deletes the Forge launch files and the libraries folder and installs Fabric or Quilt. Otherwise it reinstalls the same loader at the pack's exact version: Forge stays Forge and NeoForge stays NeoForge. The one exception is NeoForge mods on a Forge install left over from an earlier pack, where it installs NeoForge for the pack's Minecraft version.
Before that reinstall it moves the old libraries folder and argument files aside, and puts them back if the reinstall fails. If it cannot work out which loader version the pack uses, it changes nothing. The reinstall runs at most once each time the server starts; if the error comes back, the engine stops within a few attempts and reports the crash, rather than restarting forever. No mod is moved or removed by this repair.
If a MineXHost server whose files you have not changed by hand still stops on this error, contact support with the console log rather than changing your mods: the loader install is ours to fix.
Choosing a pack for a server? Our modpacks hub lists the packs our QA Lab has boot-tested, and each pack's page shows its latest test result and what that test covers.
Modpacks our QA Lab has boot-testedMineXHost runs Forge and NeoForge servers on MineXEngine. Our launcher detects the modpack, picks the right Minecraft loader and Java version, tunes the JVM for your RAM, and auto-recovers from the crashes that normally end a modded server's evening. Pick your RAM, paste the pack, and play.
See hosting plansFrequently asked questions
What does “Cannot find launch target forgeserver” mean?
Cannot find launch target forgeserver means ModLauncher, the launcher Forge and NeoForge start through, was told to hand over to a launch target called forgeserver, but none of the loader library jars it loaded provides one with that name, so the server stopped before Minecraft started. The loader install and the start script do not match: run the installer again and start with its run.sh or run.bat.
What is the difference between forgeserver, fmlserver and neoforgeserver?
The names forgeserver, fmlserver and neoforgeserver are the server launch target in different loader versions: Forge 1.13 to 1.16.5 names fmlserver inside its forge jar, Forge 1.17 to 1.20.1 and NeoForge up to Minecraft 1.21.3 use forgeserver, and NeoForge from 1.21.4 uses neoforgeserver, so the name shows which install to check. A client target such as fmlclient means the game client, not a server, has the problem.
How do I fix “Could not find or load main class @user_jvm_args.txt”?
Could not find or load main class @user_jvm_args.txt means the server's run.sh or run.bat was started with Java 8, which does not read @ argument files, so Java treated the file name as the class to start, and the fix is to run the same script with the Java version your Minecraft version needs. That is Java 17 for 1.18 to 1.20.4, Java 21 for 1.20.5 to 1.21.11, and Java 25 for 26.1 and newer.
Does MineXHost fix “Cannot find launch target” automatically?
MineXHost's launcher treats Cannot find launch target as a broken loader install and repairs the loader rather than your mods: in the usual case it reinstalls the same loader at the pack's exact version once per start, keeping the old loader files aside to restore if that fails, and if the error returns it stops and reports the crash. Contact support with the console log if that happens.
