Aside from the question, if Xms AND Xmx should be 4G, one could think of a solution, where to change such settings, either by appropiate tokens or an "after deploy script". This could be a shell script, that is doing some "sed" or "awk" thing.
Another alternative might be to put these settings into a modified start-script on each environment.
This can be either modified by tokens, or stays on the machines of the environment. e.g. The 4G heap size are just for production. On the integration environment there are smaller machines, where the application can have only 2 G of heap. Both kind of start-scripts are pretty much the same, aside from the heap size ;-)
I hope that helps you somehow further