I wanted to try Minecraft modding and downloaded it for me:
Eclipse, JDK 14.0.1 (also set the path), Minecraft 1.7.10, Forge 10.13.4.1558 downloaded.
package com.NAME;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Mod (modid = "NAME", version = NAME.VERSION)
public class NAME {
public static final string MOD_ID = "NAME";
public static final string VERSION = "1.0";
@EventHandler
public void preInit (FMLPreInitializationEvent event) {
}
@EventHandler
public void init (FMLInitializationEvent event) {
}
@EventHandler
public void postInit (FMLPostInitializationEvent event) {
}
}
(I changed my actual name of the mod to "NAME" here.) This is all my code so far (so none in principle) and I wanted to test whether it works. Unfortunately, the console says "Unrecognized option: -Xincgc" and a small "Java Virtual Machine Launcher" window opens that says:
"Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred, Program will exit. ".
What does this mean and what can I do about it? I don't really find anything helpful on the Internet. : /
First tip don't use Eclipse
Is there a reason for that? It is always used for modding everywhere and recommended for minecraft modding.
I would actually do without Java directly, but I have to go through it.
Java is great. Eclipse is outdated, not nice, is lagging when you have written a lot of code and likes to get errors like the ones you have, although it is probably due to a missing jdk or strange options
What is a "missing jdk"? And which program would you recommend?
-Xincgc is a semi-official and outdated JVM option. It is quite possible that the JDK 14 is no longer supported.
Apart from that: Minecraft apparently only supports Java 8 anyway. So it is advisable to only work with this version (you can "compile" with a newer JDK, but this does not guarantee that you will only use the 8 libraries - as a beginner you don't want to have to worry about it).
Oh thank you. Has helped.
Eclipse is the cornerstone of modern Java IDEs (and has set standards for IDEs in general, even outside the Java world). Over time, however, it became overloaded and slow, and so IntelliJ IDEA has prevailed for several years.
Eclipse really isn't as bad as its reputation. Also easier in some ways for beginners than IntelliJ. If your tutorials etc. Work with Eclipse, there's nothing to be said against it.