Gradle – bootstrap class path not set in conjunction with -source 1.5

My environment :

  1. JDK 1.7
  2. Eclipse 4.4
  3. Gradle 2.0

While gradle builld the project, I get following compile warning message :


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

Figure : Eclipse console view.

Solution

The warning is saying you are using JDK 1.7, but try to compile the project with older version Java, for example JDK 1.5 or JDK 1.6

To fix it, set both “source” and “target” to JDK 1.7.

build.gradle

apply plugin: 'java'

sourceCompatibility = 1.7
targetCompatibility = 1.7

One comment on “Gradle – bootstrap class path not set in conjunction with -source 1.5

Leave a Comment

Your email address will not be published. Required fields are marked *