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

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)

0 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

118 views 0 4
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