Main Tutorials

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

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
1 Comment
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Francis Trujillo
8 years ago

Thank you.Thank you. Thank you.