java: allow customization of xmx value

We may customize other stuff in the future.