How to get JIRA installation directory path inside JIRA plugin?

I want to display JIRA installation directory path to JIRA admin user. How can I get installation directory path usng api?

2 answers

This widget could not be displayed.

If you can indicate what the final aim, it may help.

ClassLoaderUtils.getResource usually helps to read directories and files provided, they are with the webapp directory.

hey Renjith,

On my plugin screen i want to display location of startup.sh and shutdown.sh.
For that I need to get JIRA installation directory path

It really depends.

System.getProperty("user.dir") might help, but I am not sure if it is portable (WAR deployments).

(or catalina.base)

This widget could not be displayed.

You can use JIRAHome as well, if you must need the plugins directory.

https://docs.atlassian.com/jira/latest/com/atlassian/jira/config/util/JiraHome.html#getPluginsDirectory%28%29

You can inject JiraHome in the constructor or get it using ComponentAccessor.

JiraHome jiraHome = ComponentAccessor.getComponent(JiraHome.class);

Hi Jobin,

I need path of JIRA installation directory, as I want to display location of startup.sh and shutdown.sh file on my plugin screen. Can I do that by using ComponentAccessor? Because I have checked api of ComponentAccessor and didnt find anything for JIRA installation directory. I know hoe to get JIRA home directory, but its of no use to me.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

462 views 3 17
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you