[GRADLE-1667] gradle uses wrong Java version on MacOS X 10.5 and later Created: 07/Jul/11  Updated: 04/Jan/13  Resolved: 16/Aug/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-3
Fix Version/s: 1.0-milestone-5

Type: Bug
Reporter: Konrad Hinsen Assignee: Adam Murdoch
Resolution: Fixed Votes: 0

Attachments: Text File gradle.patch    


When searching for JAVA_HOME under MacOS X, bin/gradle does not follow the procedure recommended by Apple for MacOS X 10.5 and later, which is to call /usr/libexec/java_home (see http://developer.apple.com/library/mac/#qa/qa1170/_index.html). It uses the procedure recommended for MacOS X 10.4, which does not take into account the system settings made with the Java Preferences tool.

A patch is attached. It has been tested under MacOS X 10.5 and 10.6. It should still work fine with MacOS 10.4, but I do not have that system available for testing.

Generated at Wed Jun 30 12:01:22 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.