Assign more ram to Raspberry Pi 4B Java?

Vi
- in Mods
4

I have a Minecraft server running on my Raspberry Pi 4B which I now converted to Forge to play the MInecraft Sky Modpack with my friends. But it is not used by the Ram every 4 gigabytes but only 237 megabytes.

How can I raise the ram?

kn

Start arguments Xms and Xmx

Vi

I only write java -jar name.jar

Where do the xmx and xms belong to?

kn

As an argument, as I said…

java -jar name.jar -Xms2G -Xmx3G

would e.g. Use at least 2GB RAM, but a maximum of 3GB RAM

Vi

Thank you I'll try it later