Gradle compileJava task warning: [options] bootstrap class path not set in conjunction with -source 1.6

You can bootstrap class path using bootClasspath option:

apply plugin: 'java'

sourceCompatibility = 1.6
targetCompatibility = 1.6

compileJava.options.bootClasspath = "$JDK6_HOME/jre/lib/rt.jar"

To set the bootClasspath option on all compile tasks in the project you can use the withType() method on the TaskContainer to find all tasks of type Compile:

apply plugin: 'java'

sourceCompatibility = 1.6
targetCompatibility = 1.6

tasks.withType(JavaCompile) {
    options.bootstrapClasspath = files("$JDK6_HOME/jre/lib/rt.jar")
}

gradle.properties:

JDK6_HOME=C:/JAVA/jdk6

See documentation for details.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)