Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change secure storage directory in Eclipse - user.home path issue on Windows

Tags:

java

eclipse

I have an issue with saving passwords in Eclipse. None of my passwords are "remembered" and I've found Eclipse tries to save them in a folder my Windows account doesn't have access to.

It tries to save to

D:\Users\Administrator\.eclipse\org.eclipse.equinox.security\secure_storage

a directory that does not exist and to which my Win account couldn't write anyway.

What I found is that my user.home variable is set to D:\Users\Administrator. My wild guess is that's because it's the Administrator account that installed Java.

So my question is - can I change the user.home path, or at least change some other properties to force Eclipse Secure Storage to work elsewhere?

edit: so I found a solution here What are the best JVM settings for Eclipse?

I added this to my eclipse.ini:

-eclipse.keyring
C:\some\path\file.txt

Which changed my target password storage file.

like image 637
eagerMoose Avatar asked Apr 04 '12 18:04

eagerMoose


People also ask

How do I change my storage location in eclipse?

If you would like to modify the location of the default secure storage, you can use the "-eclipse. keyring <file_path>" runtime option. The <file_path> is a path to the file which is used to persist the secure storage data. General > Security > Secure Storage preferences page.

Where does Eclipse store credentials?

After a data source is created using self-signed SSL certificate, the credentials are stored in the Eclipse secure storage vault in the datasourceId/acmfgPrivateKeyUser format.


2 Answers

-Duser.home=C:\your\path

Tested on eclipse luna.

like image 86
tsogtgerel.ts Avatar answered Oct 14 '22 08:10

tsogtgerel.ts


The secure storage location is set by the "eclipse.keyring" setting.

To change the storage location to a configuration folder under the eclipse folder with a relative path, add the following before the "-vmargs" line in the eclipse.ini file:

-eclipse.keyring
configuration\.eclipse\org.eclipse.equinox.security\secure_storage

Otherwise, an absolute path can be used like:

-eclipse.keyring
C:\eclipse\configuration\.eclipse\org.eclipse.equinox.security\secure_storage

To keep the "secure_storage" file in your user directory, copy it to the location you choose.

Tested with Eclipse Mars.

like image 5
David Robson Avatar answered Oct 14 '22 08:10

David Robson