You can increase to
2GB on a
32 bit system. If you’re on a 64 bit system you can go higher. No need to worry if you’ve chosen incorrectly, if you ask for 5g on a 32 bit system java will complain about an invalid value and quit.
As others have posted, use the cmd-line flags – e.g.
You can get a full list (or a nearly full list, anyway) by typing java -X.