altered regex to check java version due to issue with openjdk