Don't override Java memory settings if they are already set

@markhamstra