diff --git a/build.gradle b/build.gradle
index fd7f17aea2a5df65f71e164196c48acc34ba99e6..d75b497c964411dc835ff2c73a18a6fed5c8bae8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,12 +11,19 @@ subprojects {
         testCompile 'org.hamcrest:hamcrest-library:1.3'
     }
 
-    sourceCompatibility = 1.7
     jar {
         manifest {
             attributes 'Implementation-Version': '0.9.31-7'
         }
     }
+
+    sourceCompatibility = 1.7
+    // Set bootClasspath=/path/to/rt.jar:/path/to/jce.jar in gradle.properties if needed
+    if (bootClasspath) {
+        tasks.withType(AbstractCompile, { AbstractCompile ac ->
+            ac.options.bootstrapClasspath = files(bootClasspath)
+        })
+    }
 }
 
 //apply from: file('gradle/update.gradle')