When I run this command
sudo java -Xmx2G -jar forge-1.12.2-14.23.5.2838-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)
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:566)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
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.<init>(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
... 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
logs.txt