Preventing Gradle from running with 32-bit Java (#972).

This commit is contained in:
Ryan Kurtz 2019-09-13 13:00:50 -04:00
parent cb03588e52
commit ff3362b5f3

View File

@ -24,6 +24,14 @@ if (System.env.JAVA_HOME) {
else {
project.ext.JAVA_HOME = "${System.properties.'java.home'}/../"
}
/***************************************************************************************
* Make sure Gradle wasn't launched with a 32-bit Java...it can cause confusing errors
***************************************************************************************/
if ("32".equals(System.getProperty("sun.arch.data.model"))) {
throw new GradleException("\n\n\t32-bit Java detected! Please use 64-bit Java.\n\n");
}
/*********************************************************************************
* Define the location of bin repo
*********************************************************************************/