When I run this command
sudo java -Xmx2G -jar forge-1.12.2-188.8.131.5238-universal.jar nogui
This is what gets output in my console.
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
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')
... 6 more
I'm doing this with a freshly installed forge server. I used the installer, not the universal. I've already tried uninstalling every version of Java I had installed and I've tried specifically with Java 8 and got the same issue.
The issue came up kind of out of nowhere. I was updating the mod files and everything since the modpack we were running on the server updated, and after replacing the mods, scripts, config, etc. folders in my server directory I suddenly started getting errors when I tried to launch the server again.
Edit: Just thought it might be worth mentioning that when I try to launch a vanilla minecraft server out of the same directory and on the same game version, it works completely fine.
Edit Again: Attached the console logs that show me installing the forge server then trying to run it and it not fucking working