Last updated Apr 2, 2024

How do I get the location of the confluence home directory?

How do I get the location of the confluence.home directory?

First you need the BootstrapManager then simply call the following method:

Confluence 5.5 and earlier:

1
2
String confluenceHome = bootstrapManager.getConfluenceHome();

Confluence 5.6 and later:

1
2
String confluenceHome = bootstrapManager.getSharedHome();

or

1
2
String confluenceHome = bootstrapManager.getLocalHome();

The BootstrapManager also has a getConfiguredLocalHome method. This method is used during system startup to determine the location of confluence.home from first principles. There is no reason for you to call this method.

Related:

How do I get a reference to a component

Rate this page: