I'm using PyCharm and attempting to do some configuration magic. The Jetbrains IDE idea.properties
has the following:
# Use ${idea.home.path} macro to specify location relative to IDE installation home.
# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
In idea.properties
the following are referenced, but I assume it's an incomplete list:
${user.home}
${idea.home.path}
I'm trying to have a 'portable' Pycharm configuration so I'd like to make the config directory a relative path. Something like:
idea.config.path=${cwd}/pycharm/config
To do that, it seems like I'd need to be able to read environment variables or find a predefined property.
What is "any Java property" in this context? Is there a way I can get a full list of properties available at this stage of evaluation? Is there a way I can read an environment variable?
JetBrains website says
IntelliJ IDEA provides a number of other properties that define interaction with the environment (window managers, launchers, the file system, and so on). Most of them act like hidden settings (in the sense that they are not evidently exposed), which you may need to enable or disable in certain cases. Change these properties only if advised by JetBrains Support.
Which confirms that settings exist.
What are custom JVM properties: Java has its own concept of environment variables for whatever reason.
How can I obtain the system properties for a particular JVM instance programmatically?
I downloaded a JVM zip, unpacked it, and then used jcmd
.
$ Get-Process pycharm64
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
268 1,556.25 1,759.14 151.31 2092 1 pycharm64
$ .\jcmd.exe 2092 VM.system_properties
2092:
...
idea.cycle.buffer.size=1024
idea.dynamic.classpath=false
idea.fatal.error.notification=disabled
idea.max.content.load.filesize=20000
idea.max.intellisense.filesize=2500
idea.no.launcher=false
idea.paths.selector=PyCharm2023.2
...
Using environment variables is in the issue tracker, but on hold.