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 the Author

author image
mkyong
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

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Francis Trujillo Recent comment authors
newest oldest most voted
Francis Trujillo
Guest
Francis Trujillo

Thank you.Thank you. Thank you.