Minecraft server startup file does not say enough memory?

na
- in Servers
1

I tried again a Minecraft server, over the standart Minecraft server file to start.
However, since I did not get it fast enough, I wanted to allocate more RAM using a startup file (batch).
The file contains the script: java -Xmx3G -Xms2G -jar server.jar
The computer has 16GB of RAM, but I still get the message every time I start:
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap
Press any key…

How can I fix this?

P.S. 4 of the 16 GB of RAM are used.

Minecraft server startup file does not say enough memory
Co

Did you install java 64 bit?

java -version

Java HotSpot (TM) 64-bit server VM