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 Apr 30, 2018 in Marketplace Apps

Why moving to Confluence Data Center is only a job half-done

Confluence Data Center is a deployment option that was designed for performance at scale. In other words, Confluence will handle increased traffic much reliably in a clustered environment and yo...

225 views 0 6
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