https://docs.gradle.org/current/userguide/application_plugin.html

edit build.gradle

apply plugin: ‘application’

application {

applicationDefaultJvmArgs = ["-Xms512m”, “-Xmx1600m”]

}

mainClassName = “org.gradle.sample.Main”

gradle distZip

applicationDefaultJvmArgs 用于配置jvm 参数