l0b0
l0b0

Reputation: 58908

Why do my Minecraft Forge IDEA targets not work?

I've set up a basic Minecraft Forge project (the files are all there; ./gradlew runClient runs fine from a clean repository). However, the "Minecraft Client" run target created by ./gradlew genIntellijRuns doesn't run:

/usr/lib/jvm/default/bin/java -Didea.launcher.port=7533 -Didea.launcher.bin.path=/opt/idea-2016.2.5/idea-IU-162.2228.15/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/default/jre/lib/charsets.jar:/usr/lib/jvm/default/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/default/jre/lib/ext/dnsns.jar:/usr/lib/jvm/default/jre/lib/ext/jaccess.jar:/usr/lib/jvm/default/jre/lib/ext/localedata.jar:/usr/lib/jvm/default/jre/lib/ext/nashorn.jar:/usr/lib/jvm/default/jre/lib/ext/sunec.jar:/usr/lib/jvm/default/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/default/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/default/jre/lib/ext/zipfs.jar:/usr/lib/jvm/default/jre/lib/jce.jar:/usr/lib/jvm/default/jre/lib/jsse.jar:/usr/lib/jvm/default/jre/lib/management-agent.jar:/usr/lib/jvm/default/jre/lib/resources.jar:/usr/lib/jvm/default/jre/lib/rt.jar:/opt/idea-2016.2.5/idea-IU-162.2228.15/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain GradleStart
Exception in thread "main" java.lang.ClassNotFoundException: GradleStart
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:123)

Is the project missing anything? Are the targets not compatible with IDEA 2016.2.5, Linux or OpenJDK 8 somehow?

Upvotes: 1

Views: 792

Answers (1)

l0b0
l0b0

Reputation: 58908

The answer was in a random pastebin:

Finally, assuming you use IDEA 2016 or newer, you will have to open the run configurations dropdown, click on 'Edit configurations...' and in both 'Minecraft Client' and 'Minecraft Server', edit the 'Use classpath of module' option to point to the task with a name like '_main'.

I tried searching for the text elsewhere, but this is the only reference I could find.

After that it was simply a matter of creating the working directory for the task, and the project is ready to go.

Upvotes: 1

Related Questions