Re-open [GRVY-2154]
I'm still causing the problem with me.
I'm unset JAVA_HOME, and remove all Java-related from environment settings.
Now IntelliJ 8.1.2 try to set JAVA_HOME as I configured in General Settings. But I found that it FAILED set JAVA_HOME environment variable properly on my machine.
[C:\grails-1.1/bin/grails.bat, create-domain-class, Blabla]
ERROR: JAVA_HOME is set to an invalid directory: C:/jdk1.6.0_10
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
I think that JAVA_HOME value is should be C:\jdk1.6.0_10 on my environment, it should consult with path.separator before use in external command or batch file like this.
Environment: IntelliJ IDEA 8.1.2 #9852 with JetGroovy 8.0 on Windows XP SP3
Issue was resolved