Search code examples
grailscommand-linejvm-arguments

How to add custom "-Djava" arguments to Grails app?


Say I wanted to run a Grails (2.3+) app with an extra "-Djava.fizz.buzz=3" JVM arg.

Is it as simple as:

grails run-app -Djava.fizz.buzz=3

Or is there special config (say, in BuildConfig.groovy) that would need to take place?


Solution

  • The answer to your question is yes, that will work. JVM args work a bit differently. Both are in the docs about the command line.