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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

This error usually means Java started with an incomplete or incorrect classpath: IntelliJ cannot see Fabric Loom’s development launcher. It usually is not a problem with your mod’s fabric.mod.json entrypoint or your regular Minecraft installation.

Could not find or load main class net.fabricmc.devlaunchinjector.Main
Caused by: java.lang.ClassNotFoundException: net.fabricmc.devlaunchinjector.Main

From the project root—the directory containing gradlew or gradlew.bat—try Loom’s client task first: ./gradlew runClient (Windows: gradlew.bat runClient). If that works but IntelliJ’s Minecraft Client configuration fails, focus on Gradle synchronization and the IDE run configuration.

Start by separating a Gradle problem from an IntelliJ problem

Run these commands from the project root:

# macOS/Linux
./gradlew --stop
./gradlew runClient

# Windows
# gradlew.bat --stop
gradlew.bat runClient

If Gradle launches the development client but IntelliJ does not, Loom and the project can likely assemble a working launch classpath; the IDE configuration is the likely fault. If Gradle fails too, inspect the Gradle error before resetting IntelliJ.

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

In IntelliJ, open View → Tool Windows → Gradle, click Reload All Gradle Projects, and wait for synchronization, dependency resolution, and indexing to finish. Then run the generated Minecraft Client configuration again.

#1 Best Overall
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code
  • DELUXE COLLECTION — Includes the base game, three add-ons (Celebration Food, Rescue Dogs, and Plenty O’ Blocks), three exclusive Character Creator items, and 700 Minecoins.
  • CREATE — Build whatever you can imagine in your own infinite world that’s unique in every playthrough.
  • EXPLORE — Discover biomes, resources, and mobs, and craft your way through a world filled with surprises in the ultimate sandbox game.
  • SURVIVE — Experience unforgettable adventures as you face mysterious foes, traverse exciting landscapes, and travel to perilous dimensions.
  • PLAY TOGETHER — Have a blast with friends, whether you’re sitting on the same couch in split screen or miles apart in cross-platform play for console, mobile, and PC.

What the error means

net.fabricmc.devlaunchinjector.Main is an entry point used by Fabric Loom’s development launch setup. Loom sets up the development environment and generates Minecraft run configurations for IDEs. Java must have the launcher class on its runtime classpath, along with the generated launch configuration and arguments. A stale run configuration, a wrong IntelliJ module, or incomplete Gradle synchronization can leave Java unable to find it. Fabric Loom documentation describes Loom’s development and run-configuration role; a general Java explanation of this class-not-found error is available in the Gradle forum.

This happens before Fabric Loader would normally reach your mod’s own entrypoint. Changing an entry such as "com.example.mod.ExampleMod" in fabric.mod.json will therefore not usually fix a missing devlaunchinjector.Main class.

It is primarily a mod-development issue: the relevant pieces are the project’s Gradle build, Loom setup, IDE import, and JDK. Reinstalling Minecraft or Fabric Loader in the standard game launcher will not normally repair an IntelliJ classpath or Gradle project import.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes the base game, five add-ons (Celebration Food, Rescue Dogs, Plenty O’ Blocks, Decocraft, and Weapons + Tools), five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE — Build whatever you can imagine in your own infinite world that’s unique in every playthrough.
  • EXPLORE — Discover biomes, resources, and mobs, and craft your way through a world filled with surprises in the ultimate sandbox game.
  • SURVIVE — Experience unforgettable adventures as you face mysterious foes, traverse exciting landscapes, and travel to perilous dimensions.
  • PLAY TOGETHER — Have a blast with friends, whether you’re sitting on the same couch in split screen or miles apart in cross-platform play for console, mobile, and PC.

If runClient also fails

Collect the fuller Gradle error first:

# macOS/Linux
./gradlew runClient --stacktrace
./gradlew tasks
./gradlew dependencies
./gradlew javaToolchains

# Windows
# Use gradlew.bat instead of ./gradlew

The exact task list varies by Loom and project version. Resolve any Gradle synchronization or dependency errors before changing IDE metadata. Check for an invalid or unavailable Loom version, malformed Gradle files, repository access problems, proxy or certificate issues, or an incomplete project extraction. Loom supplies the development-launch dependency; mod authors do not normally implement this class or attach its JAR by hand.

Check Java and version compatibility

Verify the JDK used by Gradle and the JDK selected for the IntelliJ run configuration. The required Java version depends on the project’s Minecraft and Loom versions and any configured toolchain; there is no single version that fits every Fabric project. Check the project’s Gradle files and the release notes for its specific Loom version. For example, the Loom 1.11 release notes identify Java 21 as a requirement for that release; do not apply that requirement to every Loom or Minecraft project.

A missing Java executable or incompatible Java version commonly produces a different startup, Gradle, or unsupported-class-version error. If Java starts but reports that it cannot find devlaunchinjector.Main, the classpath or configuration remains the more direct suspect.

Rank #3
Minecraft | Standard Edition | XBOX Digital
  • Create and shape an infinite world, explore varied biomes filled with creatures and surprises, and go on thrilling adventures to perilous places and face mysterious foes.
  • Play with friends across devices or in local multiplayer.
  • Connect with millions of players on community servers, or subscribe to Realms Plus to play with up to 10 friends on your own private server.
  • Get creator-made add-ons, thrilling worlds, and stylish cosmetics on Minecraft Marketplace; subscribe to Marketplace Pass (or Realms Plus) to access 150+ worlds, skin & textures packs, and more—refreshed monthly.

If Gradle works but IntelliJ fails

  1. Confirm that IntelliJ opened the project root. Open the directory containing the root build.gradle or build.gradle.kts, not just src or a nested folder. Import or link it as a Gradle project.
  2. Check the run configuration’s module. Open Run → Edit Configurations… → Minecraft Client. In Use classpath of module or the equivalent field, choose the Gradle-synchronized module that contains the project’s source sets and resolved external libraries. Similar-looking modules can include a stale or empty IntelliJ module. Prefer correcting the Gradle import over manually adding a JAR.
  3. Test command-line shortening. In the same run configuration, find Shorten command line and temporarily set it to none. Save and retry. Some Fabric developers have reported this as a workaround when IntelliJ’s argument-file or shortened-classpath launch fails (example report; community discussion). It is a diagnostic, not a universal Fabric requirement.
  4. Regenerate the configuration if it is stale. Delete the broken Minecraft Client configuration, reload Gradle, and let Loom recreate it. Depending on the Loom version, task names such as idea or ideaSyncTask may be available; check ./gradlew tasks rather than assuming either exists. Loom’s generated IDE configuration is preferable to a manually assembled Java application configuration.

Clear generated state only if simpler fixes fail

After changing Minecraft, Loom, mappings, Java, or IntelliJ, stale generated state can sometimes keep an old launch setup around. Stop Gradle with ./gradlew --stop, close IntelliJ, and consider removing the project’s .gradle/loom-cache/. Reopen the project, reload Gradle, then try ./gradlew runClient. Loom may need to redownload or regenerate files.

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

A full ./gradlew clean removes generated build output, but it is not a substitute for a successful Gradle import. Avoid deleting the entire global Gradle cache as a first response: that can trigger substantial redownloads without correcting a bad IDE module.

If the run configuration remains corrupted, back up the project and remove the project’s .idea/ directory, and any stale *.iml files if present. Reopen the project from its root and import it as a Gradle project. This can fix incorrect module references, but it also removes project-level IntelliJ settings such as breakpoints, code styles, and inspections. Try deleting only the broken run configuration first.

Rank #4
Minecraft
  • Skins! We have biome settlers, city folk, town folk, and more!
  • The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
  • Cross platform play for up to five players between Pocket Edition and Windows 10
  • Revamped touch controls, controller support, and a controller mapping screen
  • Enhanced Weather effects! Accumulating snow and more
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check the project path

If the project is in a cloud-synchronized folder, has spaces, or contains non-ASCII characters, move a copy to a short local path and reimport it. For example:

C:ProjectsExampleMod
/home/user/Projects/ExampleMod

Fabric’s project setup guidance recommends avoiding cloud-synchronized locations, spaces, and non-ASCII characters. A simpler path can reduce path-quoting and encoding complications, especially in generated IDE launch commands. Reimport after moving the project because saved configurations may still point to its old location.

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

Compare an older or heavily modified project with a fresh template

If the same Gradle and IntelliJ steps fail, create or clone the official Fabric example mod using versions suitable for the target Minecraft release. Open it from its root as a Gradle project and run runClient. If it works, compare the failing project’s Loom and Minecraft versions, mappings, Gradle settings, JDK, and generated run configuration. Fabric’s setup guide explains the example-project workflow and version alignment.

Best Value
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

A fresh template can help isolate an outdated or damaged build, but migrating to it means carrying over custom dependencies, mixins, data generators, access wideners, and publishing settings deliberately.

Tell this error apart from later launch failures

These messages indicate different stages of startup:

  • ClassNotFoundException: net.fabricmc.devlaunchinjector.Main: Java could not load the development launcher. Start with the classpath, Gradle import, and IDE configuration.
  • missing fabric.dli.main property: the launcher class was found, but a required launch property is missing. A manual or incomplete launch configuration may be involved.
  • An access-widener, mappings, or mod-entrypoint error after the launcher starts: investigate that specific downstream failure, not the missing-class checklist. In one Loom issue, the launcher runs before a separate access-widener failure.

The same classpath issue can affect data-generation configurations such as runDatagen; changing the mod’s runtime entrypoint is not the natural fix for a launcher class that Java cannot find. See this related report.

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

Quick Recap

Bestseller No. 3
Minecraft | Standard Edition | XBOX Digital
Minecraft | Standard Edition | XBOX Digital
Play with friends across devices or in local multiplayer.
$19.99
Bestseller No. 4
Minecraft
Minecraft
Skins! We have biome settlers, city folk, town folk, and more!; The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
$6.99
Bestseller No. 5
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
$42.49

What not to do first

  • Do not download and attach a random dev-launch-injector JAR manually. Loom should resolve the development environment; a manually chosen JAR can introduce a version mismatch and mask a broken Gradle import.
  • Do not rewrite fabric.mod.json just because Java cannot find the development launcher.
  • Do not reinstall the regular Minecraft launcher as the first fix for a Loom/IntelliJ development configuration.
  • Do not create a plain Java application configuration containing only net.fabricmc.devlaunchinjector.Main. Loom’s launch requires generated dependencies, properties, and arguments.

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.