# JavaExec bootstrapClasspath docs and behaviour don't match

**URL:** <https://discuss.gradle.org/t/javaexec-bootstrapclasspath-docs-and-behaviour-dont-match/859>\
**Category:** Old Forum Archive\
**Created:** [September 24, 2014, 10:58am UTC](https://discuss.gradle.org/t/javaexec-bootstrapclasspath-docs-and-behaviour-dont-match/859 "2014-09-24T10:58:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stackmagic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/stackmagic/32/267_2.png) [@stackmagic](https://discuss.gradle.org/u/stackmagic)\
**Post date:** [September 24, 2014, 10:58am UTC](https://discuss.gradle.org/t/javaexec-bootstrapclasspath-docs-and-behaviour-dont-match/859/1 "2014-09-24T10:58:00Z")

</div>

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](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.
