add memory flag to java command