Changing default Java user preferences directory java.util.prefs.systemRoot and java.util.prefs.userRoot

Hi,

I have to use PyCharm on Linux with a username different than mine. For that user, I do not have "WRITE" access to his home folder.

PyCharm tries to create the Java User preferences under that user's home directory. How do I change that settings.

 

I tried the following

1. In the Linux environment, set the following variable

export JAVA_OPTS="-Djava.util.prefs.systemRoot=/home/myuser/JavaOpts -Djava.util.prefs.userRoot=/home/myuser/JavaOpts/.userPrefs"

I made sure the folders exists and are writable

 

2. I also tried to edit the java settigs from within pyCharm which created the following file "pycharm64.vmoptions" and I added the following two  lines

-Djava.util.prefs.systemRoot=/home/myuser/JavaOpts
-Djava.util.prefs.userRoot=/home/myuser/JavaOpts/.userPrefs

 

but this doesn't work either.

 

The question is: where do I specify these Java environment variables?

 

Thanks

 

 

0

Please sign in to leave a comment.