[SPARK-3425] do not set MaxPermSize for OpenJDK 1.8

This regex seems wrong.. it now breaks the case when you print "java version X". You need parens around the (`java\|openjdk`). Also, are you sure that OpenJDK 1.8 prints this string instead of "java version X"? I tried 1.6 and it still prints "java".