# How to get the path of Katalon Studio installation folder

**URL:** <https://forum.katalon.com/t/how-to-get-the-path-of-katalon-studio-installation-folder/132441>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [June 1, 2024, 1:49am UTC](https://forum.katalon.com/t/how-to-get-the-path-of-katalon-studio-installation-folder/132441 "2024-06-01T01:49:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [June 1, 2024, 1:49am UTC](https://forum.katalon.com/t/how-to-get-the-path-of-katalon-studio-installation-folder/132441/1 "2024-06-01T01:49:23Z")

</div>

I needed to find a way how to get the path of Katalon Studio installation folder programmatically.

I wrote a “Test Case/getInstallationFolder”:

```auto
// getInstallationFolder

import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.CodeSource;

import com.kms.katalon.core.configuration.RunConfiguration

public Path getCodeSourcePathOf(Class<?> clazz) {
	CodeSource codeSource = clazz.getProtectionDomain().getCodeSource();
	URL url = codeSource.getLocation();
	try {
		return Paths.get(url.toURI());
	} catch (URISyntaxException e) {
		throw new RuntimeException(e);
	}
}

Path jarPath = getCodeSourcePathOf(RunConfiguration.class)
println jarPath.toString()

Path pluginsPath = jarPath.getParent()
Path eclipsePath = pluginsPath.getParent()
Path contentsPath = eclipsePath.getParent()
Path installationFolderPath = contentsPath.getParent()

println installationFolderPath // on Mac, "/Applications/Katalon Studio.app"

```

I ran this, got the following output in the console:

```auto
2024-06-01 10:43:47.902 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2024-06-01 10:43:47.906 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/getInstallationFolder
/Applications/Katalon Studio.app/Contents/Eclipse/plugins/com.kms.katalon.core_1.0.0.202310232352.jar
/Applications/Katalon Studio.app
2024-06-01 10:43:48.943 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/getInstallationFolder

```

On Windows, the folder path will be something different. But no need to change the code. It will run on Linux as well.
