How to get the bootclasspath?

The doclet i’m using in javadoc (doclava) wants you to pass rt.jar(and as it happens, jsse.jar to javadoc using the -bootClasspath flag. I’ve verified it works if I use hardcoded paths for those two jars, but ideally, I would pass it the same thing that Gradle is using (to be system/$JAVA_HOME independent). Is there a way I can get the path that gradle is using for rt.jar and such?

You can use the ‘sun.boot.class.path’ system property.

The following seems to work

options.bootClasspath.addAll(["sun.boot.class.path"].split(":").collect{new File(it)})

I’d suggest using ‘File.separator’ rather than hard-coding the colon (:slight_smile: for portability. Path separator on Windows is a semi-colon (;).