diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-04 02:09:16 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-05 02:11:51 +0300 |
commit | 694d51d7bb5a5900fb30d201a8d675cec0f5e92b (patch) | |
tree | a308b00dd5275a24ea235b7d7b4da27111f15095 /runners/cli/src/main/kotlin | |
parent | ce7ebd213a56abd2be6beacbef26b339935baeb6 (diff) | |
download | dokka-694d51d7bb5a5900fb30d201a8d675cec0f5e92b.tar.gz dokka-694d51d7bb5a5900fb30d201a8d675cec0f5e92b.tar.bz2 dokka-694d51d7bb5a5900fb30d201a8d675cec0f5e92b.zip |
Fix Can't find node by signature in asJava mode
fixes #205
Diffstat (limited to 'runners/cli/src/main/kotlin')
-rw-r--r-- | runners/cli/src/main/kotlin/cli/main.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index c12166c5..77ca57f6 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -139,8 +139,10 @@ object MainKt { fun createClassLoaderWithTools(): ClassLoader { val toolsJar = findToolsJar().canonicalFile.toURI().toURL() + val originalUrls = (javaClass.classLoader as? URLClassLoader)?.urLs val dokkaJar = javaClass.protectionDomain.codeSource.location - return URLClassLoader(arrayOf(toolsJar, dokkaJar), ClassLoader.getSystemClassLoader().parent) + val urls = if (originalUrls != null) arrayOf(toolsJar, *originalUrls) else arrayOf(toolsJar, dokkaJar) + return URLClassLoader(urls, ClassLoader.getSystemClassLoader().parent) } fun startWithToolsJar(args: Array<String>) { |