Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

warning: [options] bootstrap class path not set in conjunction with -source 1.7 1 warning

I get a warning message at Build time in my gradle console:

warning: [options] bootstrap class path not set in conjunction with -source 1.7 1 warning

How can I fix this?

Any help is appreciated!

like image 301
Austin Joseph Avatar asked Mar 04 '17 18:03

Austin Joseph


1 Answers

Simply put the following code inside the buildscript tag of the project level build.gradle:

tasks.withType(JavaCompile) {
    targetCompatibility = '1.7'
    sourceCompatibility = '1.7'
    options.setBootClasspath("PATH_TO_JAVA_7_JRE/lib/rt.jar")
}

Just make sure to replace PATH_TO_JAVA_7_JRE with the path to yours.

I've struggled with this issue myself a couple of weeks now and finally come up with a solution, which hopefully works for others as well. Hope it helps!

like image 146
Daniel Kvist Avatar answered Oct 14 '22 05:10

Daniel Kvist