title: An illegal reflective access operation has occurred when trying to run Minecraft from Eclipse
body: <p>I want to start modding Minecraft, but I am unable to launch it from Eclipse. Here is the error message I recieve when I try to use <code>Run Configurations</code> with <code>net.minecraftforge.legacydev.MainClient</code>:</p>
  <pre><code>[2020-10-18 19:22:51] [INFO   ] Natives: C:\Users\MyPC\Documents\Projects\Forge-MDK\build\natives 
  WARNING: An illegal reflective access operation has occurred
  WARNING: Illegal reflective access by net.minecraftforge.legacydev.MainClient (file:/C:/Users/MyPC/.gradle/caches/modules-2/files-2.1/net.minecraftforge/legacydev/0.2.3.1/f2cd4a8c9f09faf1c1e4a9a4c65df36e634f95db/legacydev-0.2.3.1-fatjar.jar) to method java.lang.ClassLoader.initializePath(java.lang.String)
  WARNING: Please consider reporting this to the maintainers of net.minecraftforge.legacydev.MainClient
  WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
  WARNING: All illegal access operations will be denied in a future release
  [2020-10-18 19:22:51] [INFO   ] Main Class: net.minecraft.launchwrapper.Launch 
  [2020-10-18 19:22:51] [INFO   ] Srg2Mcp: C:\Users\MyPC\Documents\Projects\Forge-MDK\build\createSrgToMcp\output.srg 
  [2020-10-18 19:22:51] [INFO   ] Extra: [] 
  [2020-10-18 19:22:51] [INFO   ] Running with arguments: [--version, 1.16.2, --assetIndex, 1.12, --assetsDir, C:\Users\MyPC\.gradle\caches\forge_gradle\assets, --accessToken, {REDACTED}, --userProperties, [], --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker] 
  Exception in thread &quot;main&quot; java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at net.minecraftforge.legacydev.Main.start(Main.java:86)
      at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)
  Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
      at net.minecraft.launchwrapper.Launch.&lt;init&gt;(Launch.java:34)
      at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
      ... 6 more
  </code></pre>
  <p>I've checked out similar questions to mine before, and the general consensus was that the newest version of Java was not supported by Minecraft, and I would have to use Java 8 (or 1.8). So, I changed my Eclipse preferences to have my execution environment set to <code>Java Platform, Standard Edition 8.0</code>. I also downloaded the JDK with version <code>openjdk version &quot;1.8.0_265&quot;</code> and set the compiler preference to <code>1.8</code>. None of these methods have resolved this issue. I know that this issue should not be possible if I am using Java 8, so what am I forgetting about?</p>
  <p>Thanks in advance!</p>