PYCHARM_PROPERTIES not working

I'm trying to create a portable installation of PyCharm by moving idea.properties to the root of the installation folder of PyCharm.

1. I set PYCHARM_PROPERTIES (according to the comment in idea.properties[1]). I tried different paths (relative, absolute ones, forward and backward slashes) but I always get the following exception:
"java.lang.RuntimeException: Could not find IDEA home path. Please make sure bin/idea.properties is present in the installation directory.
 at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:81)
 at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:81)
 at com.intellij.openapi.application.PathManager.loadProperties(PathManager.java:370)
 at com.intellij.ide.ClassloaderUtil.initClassloader(ClassloaderUtil.java:88)
 at com.intellij.ide.Bootstrap.main(Bootstrap.java:38)
 at com.intellij.ide.Bootstrap.main(Bootstrap.java:34)
 at com.intellij.idea.Main.main(Main.java:81)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
 at com.exe4j.runtime.WinLauncher.main(Unknown Source)
"

Thorsten
[1] "Set up PYCHARM_PROPERTIES environment variable to specify custom location of this properties file [...]"
5 comments
Comment actions Permalink
First of all, I'm not sure how moving the idea.properties file would help in making a portable installation of PyCharm. You can just as well move the entire PyCharm installation directory to a USB drive and edit idea.properties in its default location.

Second, if you define a non-standard value for PYCHARM_PROPERTIES, you also need to set the idea.home.path system property pointing to the root of PyCharm installation.
0
Comment actions Permalink
At 1. Normally I update portable installations by copying the updated files to the flash drive. In that case this would overwrite idea.properties because I would expect only binaries in the bin folder.

at 2. a) PYCHARM_PROPERTIES points to idea.properties. The PyCharm executable cannot find idea.properties, so where should I set idea.home?

at 2. b) idea.home hasn't changed so why should I change or set it?
0
Comment actions Permalink
In order to be able to change idea.home.path, you need to run PyCharm using the .bat file instead of using the .exe launcher, and add the idea.home.path definition to the IDE_JVM_ARGS option.

The idea.home.path needs to be defined because normally PyCharm uses the location of the idea.properties file to locate its own installation. If the location is changed, the installation home needs to be specified explicitly.
0
Comment actions Permalink
Hm, thanks, but at the moment this looks like too much effort for me. I made a copy of idea.properties and in case I overwrite the original, I just copy it back.

I suggest you revise lines 1 to 6 in idea.properties because they suggest that all you need to change the location of that file is to set PYCHARM_PROPERTIES and this is highly misleading.
0
Comment actions Permalink
We've already removed the information from the file.
0

Please sign in to leave a comment.