On Windows, you can apply the subsequent command to find out the defaults on the system wherever your applications run.
java -XX:+PrintFlagsFinal -version | findstr HeapSize
Watch for the opportunities MaxHeapSize (for -Xmx) and InitialHeapSize for -Xms.
On a Unix/Linux system, you can make
java -XX:+PrintFlagsFinal -version | grep HeapSize
I think the resulting product is in bytes.