IntelliJ won't start Minecraft?

I wanted to try to program a Minecraft mod but when I load the project I get this error message:

I'm new to IntelliJ and have this problem. Can someone help me? I have no idea how to do this? By the way, it's a fabric mod.

1 vote, average: 1.00 out of 1 (1 rating, 1 votes, rated)
You need to be a registered member to rate this.
Loading...
Subscribe
Notify of
5 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Floinki
3 months ago

Okay, the error means that your Gradle (the installer for the Fabric API as dependency and much more) uses another Java version, so you need.

You change this as follows:

1.Install the Java 21 jdk .

Two. Go to File/Settings/Build/BuildTools/Gradle in InteliJ and select Java 21.

3. You have a build.gradle file in your project, where you need to search and change the following

 java {  toolchain {    languageVersion = JavaLanguageVersion.of(21)  } }

Then in the terminal:

./gradlew wrapper

This guide changes depending on how your project was initialized

Floinki
3 months ago
Reply to  Nnyfacul

Then add it