So I created a forge server and it is working fine normally (as in just launching the jar file). However, I can't seem to add more ram like I can to a vanilla server.
I usually go to terminal and type:
cd Server Folder
java -Xmx4G -Xms4G -jar forge-1.12.2-14.23.5.2838-universal.jar
----
and if I switched the forge server with vanilla it would typically work. But if I do it with the forge server it prompts:
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:567)
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
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
-----
I was just wondering how to allocate more ram to my forge server and I can definitely do this on windows but I am not too well-versed with MacOS. Thank you!