Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/390.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Gradle在“之后更改JRE”;“梯度刷新”;_Java_Gradle_Javafx - Fatal编程技术网

Java Gradle在“之后更改JRE”;“梯度刷新”;

Java Gradle在“之后更改JRE”;“梯度刷新”;,java,gradle,javafx,Java,Gradle,Javafx,我目前正在使用LibericaJDK-11作为eclipse中的默认JRE,也在我的项目中。我将Gradle添加到我的项目中,每次我都通过Gradle刷新项目。它将JRE设置为JavaSE-11。我必须手动把它放回利比里亚 有没有办法在Gradle.build或Gradle.settings中为Gradle设置默认JRE 下面的代码是我的gradle.build plugins { id 'java-library' id 'application' id 'pmd' }

我目前正在使用LibericaJDK-11作为eclipse中的默认JRE,也在我的项目中。我将Gradle添加到我的项目中,每次我都通过Gradle刷新项目。它将JRE设置为JavaSE-11。我必须手动把它放回利比里亚

有没有办法在Gradle.build或Gradle.settings中为Gradle设置默认JRE

下面的代码是我的gradle.build

plugins {
    id 'java-library'
    id 'application'
    id 'pmd'
}


version = '0.0.1'
group = 'zuulsLostPlace.MainApp'

application{
    mainClassName = "zuulsLostPlace.MainApp"
}


dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
}

test {
    useJUnitPlatform()
}

repositories {
    mavenCentral()
}

task(runGameNoGUI, dependsOn: 'classes', type: JavaExec) {
    group 'application'
    description 'Starts the Text Adventure without GUI'
    main = 'zuulsLostPlace.model.Game'
    standardInput = System.in
    ignoreExitValue true
    classpath = sourceSets.main.runtimeClasspath
}

task(runGameGUI, dependsOn: 'classes', type: JavaExec) {
    group 'application'
    description 'Starts the Text Adventure with GUI'
    main = 'zuulsLostPlace.MainApp'
    standardInput = System.in
    ignoreExitValue true
    classpath = sourceSets.main.runtimeClasspath
}

task myJavadocs(type: Javadoc) {
    source = sourceSets.main
    tasks.withType(Javadoc) {
        options.addStringOption('Xdoclint:none', '-quiet')
        options.addStringOption('encoding', 'UTF-8')
        options.addStringOption('charSet', 'UTF-8')
    }
}

这回答了你的问题吗?尝试过,不起作用:/n您可能希望编辑您的问题,并包括您尝试过的内容。这是否回答了您的问题?试过了,不起作用:/您可能想编辑您的问题并包括您到底试过的内容。