The flags -XX:MaxHeapSize and -XX:InitialHeapSize are not communicating enough with each other and they seem to have different lower limits. Some examples:
-XX:MaxHeapSize=4m -XX:InitialHeapSize=8m -> Runs with a heap of almost 8M
-XX:MaxHeapSize=4m -XX:InitialHeapSize=4m -> Will not start (Incompatible minimum and initial heap sizes specified)
-XX:MaxHeapSize=8m -XX:InitialHeapSize=4m -> Will not start (Incompatible minimum and initial heap sizes specified)
-XX:MaxHeapSize=4m -> Runs with a heap of 5M
-XX:MaxHeapSize=3m -> Runs with a heap of 4M
-XX:MaxHeapSize=2m -> Runs with a heap of 3M
-XX:InitialHeapSize=6m -> Will not start (Incompatible minimum and initial heap sizes specified)
-XX:InitialHeapSize=7m -> Runs with a heap of 8.2M
-XX:InitialHeapSize=8m -> Runs with a heap of 8.875M
This is with Parallel GC. Other GCs behaves differently in some cases. G1 seems to be closest to working intuitively.