Liking cljdoc? Tell your friends :D

metabase.common.classloader

Logic for getting and setting the context classloader we'll use for loading Metabase plugins. Use the-classloader to get the Classloader you should use with calls to Class/forName; call it for side effects to ensure the current thread context classloader will have access to JARs we add at runtime before calling require.

The classloader is guaranteed to be an instance of DynamicClassLoader, which means we can add URLs to it at runtime with dynapath; use add-url-to-classpath! to add URLs to the classpath to make sure they are added to the correct classloader.

If you are unfamiliar with ClassLoaders in general, I found this article pretty helpful: https://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html.

<3 Cam

Logic for getting and setting the context classloader we'll use for loading Metabase plugins. Use `the-classloader`
to get the Classloader you should use with calls to `Class/forName`; call it for side effects to ensure the current
thread context classloader will have access to JARs we add at runtime before calling `require`.

The classloader is guaranteed to be an instance of `DynamicClassLoader`, which means we can add URLs to it at
runtime with dynapath; use `add-url-to-classpath!` to add URLs to the classpath to make sure they are added to the
correct classloader.

If you are unfamiliar with ClassLoaders in general, I found this article pretty helpful:
https://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html.

<3 Cam
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close