I confess I am a desperate noob with both gradle and linux, but after having trouble getting gradle to run I discovered that the problem was the line
in the gradle shell script (gradle 1.4)
This seems a bit presumptuous (my JDK installed to /usr/lib/jvm/java-7-oracle). Surely the script should presume the user sets their JAVA_HOME variable as they see fit, or at least check if its set, and if not then try a default value.
I’ve fixed it for now, but am I going to have to hack the script again when I update my Gradle version?