How can I change the .eclipse folder in Linux? I tried adding this line:
-Dosgi.configuration.area=/directory/directory1/eclipse/.eclipse
at the top of eclipse.ini but it doesn't work. I've also tried adding it to various other places in the eclipse.ini but still no luck.
Edit
I have added this line:
-Dosgi.configuration.area=file:/directory/directory1/eclipse/.eclipse
immediately below -vmargs. When Eclipse starts, it now reads from the correct .eclipse location and if .eclipse does not exist there, it creates it. Unfortunately, after Eclipse has loaded, another .eclipse folder is created in my home folder and Eclipse then continues to read from that folder. I suspect that my eclipse.ini file is now correct but there is another file I need to change.
The simplest thing to do is probably pass java a different
user.home
so that all the other myriad of places that derive a location base it off ofuser.home
. So instead of what you have, use this in.ini
file:In addition to .eclipse, you will probably find other directories created in your overridden
user.home
, such as.p2
,.oracle_jre_usage
, etc.Other notes:
-Dosgi.configuration.area
is the changes the configuration area for Eclipse, it does not effect user area. You also probably don't want to change that setting away from the default unless you really want multiple configurations (read more below).Additionally, the normal thing to do would be to use
-configuration
as an argument toeclipse{.exe}
and let eclipse convert it to the appropriate VM argument.You probably want
-user
though to override the user area. Have a look at locations in the Eclipse help for more info (quoted below).However, there are still things that have individual control over their location, such as secure storage, which is controlled by the
-eclipse.keyring
command line argument.You must put property definitions like this at the end of the eclipse.ini after the
-vmargs
line. If there is no-vmargs
line you must add one.So: