sed 's/1024/2048/g'
will translate 1024 to 2048 globally, throughout the file, which might be unwise. It would be much better to limit the translation somehow. If your goal is in fact the one you stated, namely changing -Xmx1024m to -Xmx2048m, then the following would at least be a reasonable start (assuming your sed supports the -i option):
sed -i -e 's/-Xmx1024m/-Xmx2048m/' standalone.conf
(If your sed does not support -i, then make the obvious changes.)
If the timestamp of the file is useful, and if you only want to update the file if it needs updating, then consider:
grep -q -e -Xmx1024m standalone.conf && sed -i -e 's/-Xmx1024m/-Xmx2048m/' standalone.conf