The docs of the bootstrapClasspath method state: “Adds the given values to the end of the bootstrap classpath for the process.”
However, the bootclasspath per se is replaced, leading to “java/lang/NoClassDefFoundError: java/lang/Object” because not even the rt.jar is available anymore.
Here’s a build.gradle to illustrate the problem: https://gist.github.com/stackmagic/6d2bfb876209bb1e3eb3
I’m not sure if this is expected behaviour - it wasn’t to me. So maybe updating the docs will suffice. On the other hand, adding a way to mangle specifically the prepended and appended bootclasspath components is likely helpful to others too. I came across this problem while adding the npn-boot library to enable spdy in dropwizard.