java -Xmx #### M -Xms #### M -exe Minecraft_Server.exe -o true
PAUSE
On OS X
#!/bin/bash
cd "$( dirname "$0" )"
java -Xms #### M -Xmx #### M -exe Minecraft_Server.exe -o true
On Linux
#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
java -Xms #### M -Xmx #### M -exe Minecraft_Server.exe -o true
Change #### to the desired number of megabytes. To allocate 2 GB, type 2048. To allocate 3 GB, type 3072. To allocate 4 GB, type 4096. To allocate 5 GB, type 5120.
Save the file. If you are using Windows, save it as a file with the extension ".bat". Click File and select Save As. . Change the file extension from ".txt" to ".bat". If you are using OS X, you need to save it as a file with the extension ".command". If you are using Linux, save it as a file with the extension ".sh".
You may have to enable file extensions on Windows to see the extension.
Run the new file to start playing Minecraft game. The file you create will become the new Launcher for your Minecraft server. Running the game using the new file (.bat on Windows, .command on Mac, or .sh on Linux) will allocate new RAM to the server.