我需要在使用Gradle构建时向我的jar添加默认JVM选项.从我得到的文档中我必须设置:
applicationDefaultJvmArgs = ["-Djavafx.embed.singleThread=true"]
Run Code Online (Sandbox Code Playgroud)
我没有太多使用Gradle的经验,编写build.gradle文件的开发人员写的不同于大多数网站提供的示例.
这是build.gradle:
apply plugin: 'java'
apply plugin: 'eclipse'
version = '0.1'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
compile 'placeholder'
}
task release(type: Jar) {
manifest {
attributes("Implementation-Title": "placeholder",
"Implementation-Version": version,
'Main-Class': 'placeholder.Application')
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}
Run Code Online (Sandbox Code Playgroud)
我不知道在哪里提出论点.我尝试将它们放在不同的位置,但我总是得到:
A problem occurred evaluating root project 'placeholder'.
> No such property: applicationDefaultJvmArgs for …Run Code Online (Sandbox Code Playgroud)