How to package my own java agent and patch java command line with path to agent

Hi All,

I’m a plugin dev newbie. I want to build a plugin that will package my own java agent jar and patch the Java command line with -javaagent and the absolute path to the IntelliJ home plugins directory where my plugin artifacts are located.

Is there a way to access the absolute path to the IntelliJ plugin directory?

Thanks,

Nic.

What you are probably looking for is this PathManager.getPluginsDir()