What shell are you using and how exactly did you install JAVA_HOME ? Grails should respect your JAVA_HOME parameter while it is displayed by the grails , for example, in bash you should export instead of a variable, and not just for it, tcsh use setenv and not set .
$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home
You can also remove /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin from your PATH since /usr/bin/java will automatically delegate the corresponding java command for the current JAVA_HOME .
source share