简体   繁体   English

更改 Eclipse 中的安全存储目录 - Windows 上的 user.home 路径问题

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

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.我在 Eclipse 中保存密码时遇到问题。我的密码都没有被“记住”,我发现 Eclipse 试图将它们保存在我的 Windows 帐户无权访问的文件夹中。

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.一个不存在的目录,我的 Win 帐户无论如何也无法写入。

What I found is that my user.home variable is set to D:\Users\Administrator.我发现我的 user.home 变量设置为 D:\Users\Administrator。 My wild guess is that's because it's the Administrator account that installed Java.我的疯狂猜测是因为它是安装 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?所以我的问题是 - 我可以更改 user.home 路径,或者至少更改一些其他属性以强制 Eclipse Secure Storage 在其他地方工作吗?

edit : so I found a solution here What are the best JVM settings for Eclipse?编辑:所以我在这里找到了解决方案Eclipse 的最佳 JVM 设置是什么?

I added this to my eclipse.ini:我将此添加到我的 eclipse.ini 中:

-eclipse.keyring -eclipse.keyring
C:\some\path\file.txt C:\一些\路径\文件.txt

Which changed my target password storage file.这改变了我的目标密码存储文件。

-Duser.home=C:\your\path

Tested on eclipse luna.在 eclipse luna 上测试。

The secure storage location is set by the "eclipse.keyring" setting.安全存储位置由“eclipse.keyring”设置设置。

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文件夹下的配置文件夹,请在eclipse.ini文件中的“-vmargs”行前添加以下内容:

-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.要将“secure_storage”文件保留在您的用户目录中,请将其复制到您选择的位置。

Tested with Eclipse Mars.用 Eclipse Mars 测试。

Im not 100% sure but if you add this line我不是 100% 确定,但如果你添加这一行

-user c:\some\path

to your eclipse.ini or use it as cmd parameter it should work.到您的 eclipse.ini 或将其用作 cmd 参数它应该可以工作。

try to add new arg to eclipse.ini to point to your folder尝试将新的 arg 添加到 eclipse.ini 以指向您的文件夹

http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.user/reference/ref-securestorage-options.htm http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.user/reference/ref-securestorage-options.htm

it is the only solution i found这是我找到的唯一解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM