How to get the path where Intellij IDEA is installed?

Answered

Hello,

for a plugin I want to set the param "-Didea.launcher.bin.path" to the actuall used Intellij IDEA install directory. But I couldn't figure out how to get it programatically.
The value is not set for some reason & I need it to add it as VM option to some Unit Test Execution.

I stumbeld over link and ApplicationInfo.getInstance().getFullVersion() which helps to get the version. But it would be great to get the full path to the install directory...
I am glad for any kind of help! Thank you!

Philipp

3 comments
Comment actions Permalink

PathManager.getHomePath()

1
Comment actions Permalink

Great! Thank you!

0
Comment actions Permalink

HI I have the same issue but for me PathManager.getHomePath returns the gradle caches path like below.

C:\Users\Pallavi.Pallavi\.gradle\caches\modules-2\files-2.1\com.jetbrains.intellij.idea\ideaIC\2020.1\cbeeb1f1aebd4c9ea8fb5ab990c5904a676fc41a\ideaIC-2020.1

 

but I wanted C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.

 

ANy idea how to get the same?

0

Please sign in to leave a comment.