Grails:将选项传递给分叉的JVM [英] Grails: Pass options to the forked JVM
问题描述
我使用的是Grails 2.3.5,我需要将选项传递给分叉的JVM。我试着通过设置JAVA_OPTS环境变量来做到这一点,但是这只会被分叉的JVM忽略。我怎么能通过分叉的JVM选项?
我发现这个: http://jira.grails.org/browse/MAVEN-177?page=com.atlassian。 jira.plugin.system.issuetabpanels:all-tabpanel ,但这就是如果你使用我相信的Maven插件。我正在寻找等价物,但不必获得涉及Maven插件的功能。 根据: http://grails.org/doc/2.3.x/guide/commandLine.html#forkedMode (靠近可以在 grails.project.fork
配置中使用 jvmArgs
。在BuildConfig中:
grails.project.fork = [
// ...
run:[ maxMemory:1024,minMemory:64,debug:false,maxPerm:256,jvmArgs:'..任意JVM参数..']
// ...
]
I'm using Grails 2.3.5 and I need to pass an option to the forked JVM. I've tried doing this by setting the JAVA_OPTS environment variable, but that simply gets ignored by the forked JVM. How can I go about passing the forked JVM an option?
I've found this: http://jira.grails.org/browse/MAVEN-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel but that's if you're using the Maven plugin I believe. I'm looking for the equivalent but without having to get Maven plugin involved.
According to: http://grails.org/doc/2.3.x/guide/commandLine.html#forkedMode (near the bottom of the section) you can use jvmArgs
in your grails.project.fork
configuration. In BuildConfig:
grails.project.fork = [
// ...
run: [maxMemory:1024, minMemory:64, debug:false, maxPerm:256, jvmArgs: '..arbitrary JVM arguments..']
// ...
]
这篇关于Grails:将选项传递给分叉的JVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!