Remove -Xmx512M flag when detecting java version

The flag can cause problems when there is another configuration
adding -Xms with a value bigger than 512M. The `java -version`
command will fail and no java version will be detected, causing
a failure in `checkJava`.
This commit is contained in:
Marcos Pereira 2018-01-02 18:15:07 -02:00
parent cb6bae6c45
commit f9295a6715
No known key found for this signature in database
GPG Key ID: F7EBB0FF122A3D87
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ process_args () {
}
## parses 1.7, 1.8, 9, etc out of java version "1.8.0_91"
java_version=$("$java_cmd" -Xmx512M -version 2>&1 | grep ' version "' | sed 's/.*version "\([0-9]*\)\(\.[0-9]*\)\{0,1\}\(.*\)*"/\1\2/; 1q')
java_version=$("$java_cmd" -version 2>&1 | grep ' version "' | sed 's/.*version "\([0-9]*\)\(\.[0-9]*\)\{0,1\}\(.*\)*"/\1\2/; 1q')
vlog "[process_args] java_version = '$java_version'"
}