How do I load a resource from a plugin?

The recommended way to get resources from the classpath in Confluence is:

InputStream in = com.atlassian.core.util.ClassLoaderUtils.getResourceAsStream(filename, this);

ClassLoaderUtils tries a couple of different classloaders, something we've occasionally found necessary in some application servers.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport