How to Run a Pixelmon Server: Fixing Forge 1.12.2 Errors


If you’re like me, and you’ve tried to set up a Forge 1.12.2 server for Pixelmon, only to have it fail with an error, then this blog post is for you! In this article, I’ll be walking you through the steps I took to get my Forge server up and running. Hopefully this will help some of you out there who are struggling with the same issue.

A problem occurred running the Server
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
at java.base/java.lang.reflect.Method.invoke(
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class (jdk.internal.loader.ClassLoaders$AppClassLoader and are in module java.base of loader ‘bootstrap’)
at net.minecraft.launchwrapper.Launch.<init>(
at net.minecraft.launchwrapper.Launch.main(
… 6 more


I searched around for half an hour trying to find a fix for this that worked, but nothing has so far. I am pretty sure I already had java 8 installed when I first started having this issue, but just to be sure I found an old download for java 8 from around 2018 to see if that would work, and it still didnt. Im at a loss for what to do in this scenario, so I was hoping someone here could help.