либо гуглил плохо, либо смотрел жопой
Could not find or load class / no JDK module specified
Sometimes the run config may be invalid, reporting errors such as:
Could not find or load class net.fabricmc.devlaunchinjector.Main: java.lang.ClassNotFoundException
“no JDK module specified” in the run config
There are several fixes, among which one may be a potential fix:
If you're using Intellij IDEA, go to “project strcture” and then select “Modules” tab, then clear all modules. Then reload your gradle project.
It seems to be a bug of Intellij IDEA since a recent update 2023.2. To fix, just delete the .idea folder entirely and then restart Intellij IDEA. The module will be reconstructed. You may need to specify Java versions again. If after restarting there is no run config, you can run gradle ideaSyncTask then check it again.
If you have subprojects, please ensure your subprojects are configured correctly. If the build.gradle of your subproject exists, check whether the gradle plugin maven-publish is enabled or applied to it. Try adding apply plugin: maven-publush in the build.gradle file, if it is not declared at all.
If the issue still happens, edit the run config, and try modifying the module (the value for parameter -cp) to other values.