As of Grails-1.2.2 we have a better way to specify JVM options just for Grails!
So now that headless option won’t prevent groovyConsole from starting, yay!
Note: this is for firing Grails up from the command line, not deployment.
Just specify GRAILS_OPTS as you would JAVA_OPTS in your environment (e.g. in /etc/environment).
This should work for *nix environments not sure about others.
GRAILS_OPTS is used then JAVA_OPTS so globals specified in the later will over-ride the former.
Also note that you may have to logout/in, depending on your environment configuration. Being able to ‘echo $GRAILS_OPTS’ may not be enough. So simply running GRAILS_OPTS=’x’ in the current shell may not work.