In my Jira-plugin I'm trying to load a resource. When the plugin is installed it doesn't work, but after a restart of Jira everthing works fine. I have tried the following methods with various getClass-methods. All with the same result.
String resource = "/resource.tmp"; // Located in /src/resources
InputStream in = getClass().getClassLoader().getResourceAsStream(resource);
InputStream in = com.atlassian.core.util.ClassLoaderUtils.getResourceAsStream(resource, this.getClass());
InputStream in = ComponentAccessor.getPluginAccessor().getDynamicResourceAsStream(resource);
InputStream in = webwork.util.ClassLoaderUtils.getResourceAsStream(resource, MailSender.class);
I'm using Spring Scanner version 2.1.8
Moved to Developer Community:
When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event