Eclipse 需要哪些权限才能运行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2056368/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which permissions does Eclipse need to run?
提问by c0d3x
I installed Eclipse and am having some trouble relating to denied user permissions.
我安装了 Eclipse,但遇到了一些与拒绝用户权限相关的问题。
I am working on Vista inside a Windows domain. My user account is very restricted. My boss needs to grant administrator permission any time I install any application or establish a new network connection through the firewall.
我正在 Windows 域中使用 Vista。我的用户帐户非常受限制。每当我安装任何应用程序或通过防火墙建立新的网络连接时,我的老板都需要授予管理员权限。
Here are some of the problems that have occurred:
以下是一些已经发生的问题:
- At Eclipse startup, Vista asks every time if I really want to run it. It doesn't remember my decision.
- Eclipse doesn't remember my default workspace.
- I installed the BIRT plugin. After a second restart it doesn't work anymore. The BIRT perspective does not run fine.
- 在 Eclipse 启动时,Vista 每次都会询问我是否真的要运行它。它不记得我的决定。
- Eclipse 不记得我的默认工作区。
- 我安装了 BIRT 插件。第二次重启后,它不再工作了。BIRT 透视图运行不正常。
What permissions do I need to run Eclipse on Windows?
在 Windows 上运行 Eclipse 需要什么权限?
回答by Dejay Clayton
This problem occurs when you host the Eclipse application within a directory that is protected by the Vista or Windows 7 operating system. For example, %ProgramFiles%
, %ProgramFiles(x86)%
, or %ProgramW6432%
. Unfortunately, for all of Eclipse's maturity, it still doesn't entirely restrict its per-user activities to the Windows operating system's user space.
当您在受 Vista 或 Windows 7 操作系统保护的目录中托管 Eclipse 应用程序时,会出现此问题。例如,%ProgramFiles%
、%ProgramFiles(x86)%
、 或%ProgramW6432%
。不幸的是,尽管 Eclipse 已经很成熟,但它仍然没有将其每个用户的活动完全限制在 Windows 操作系统的用户空间中。
If you don't care where your Eclipse application resides, or you don't have admin rights on your system, try moving the Eclipse application to a directory that is not protected by the Windows operating system.
如果您不关心 Eclipse 应用程序驻留在何处,或者您没有系统管理员权限,请尝试将 Eclipse 应用程序移动到不受 Windows 操作系统保护的目录。
If you have admin rights on your system, and want your Eclipse application to be hosted in one of Window's protected directories, you must make the directory writable to users. This will allow the proper operation of the Eclipse application, but be warned that it will also allow users to directly modify files within the Eclipse application directory. You can reduce this risk by making the directory writable to only the specific accounts that you choose.
如果您在系统上拥有管理员权限,并且希望将 Eclipse 应用程序托管在 Window 的受保护目录之一中,则必须使该目录对用户可写。这将允许 Eclipse 应用程序正常运行,但请注意,它还允许用户直接修改 Eclipse 应用程序目录中的文件。您可以通过使目录仅对您选择的特定帐户可写来降低此风险。
Note that by performing either of the above solutions, it will not be necessary to run the Eclipse application with the "Run as Administrator" option.
请注意,通过执行上述任一解决方案,不需要使用“以管理员身份运行”选项运行 Eclipse 应用程序。
To make the Eclipse application directory writable by users:
要使用户可写 Eclipse 应用程序目录:
- Right click on the Eclipse application directory within Windows Explorer.
- Select "Properties".
- Click the "Security" tab.
- Click the "Edit..." button to change security permissions for the Eclipse folder.
- If you want only specific user accounts to be able to write to the Eclipse application directory, click the "Add..." button to allow those accounts to appear within the "Group or user names" list.
- One at a time, select each account to be granted write access to the Eclipse application directory, and then click the checkbox for "Modify / Allow" such that the checkbox is checked.
- Conversely, if you want to allow all system users to be able to use Eclipse properly, select the "Users (YourComputerName\Users)" group from the "Group or user names" list, and then click the checkbox for "Modify / Allow" such that the checkbox is checked.
- After all appropriate users have been given write access to the Eclipse application directory, click "OK". You should now be able to run Eclipse without issue.
- 右键单击 Windows 资源管理器中的 Eclipse 应用程序目录。
- 选择“属性”。
- 单击“安全”选项卡。
- 单击“编辑...”按钮以更改 Eclipse 文件夹的安全权限。
- 如果您只希望特定用户帐户能够写入 Eclipse 应用程序目录,请单击“添加...”按钮以允许这些帐户出现在“组或用户名”列表中。
- 一次一个,选择要授予对 Eclipse 应用程序目录的写访问权的每个帐户,然后单击“修改/允许”复选框,以便选中该复选框。
- 相反,如果要允许所有系统用户都能正常使用 Eclipse,请从“组或用户名”列表中选择“用户 (YourComputerName\Users)”组,然后单击“修改/允许”复选框这样复选框被选中。
- 在所有合适的用户都被授予对 Eclipse 应用程序目录的写访问权限后,单击“确定”。您现在应该可以毫无问题地运行 Eclipse。
回答by Ricket
tharkun's answeris sort of correct but I just wanted to post a "more correct" answer for anyone else who finds this question in the future.
tharkun 的回答有点正确,但我只是想为将来发现这个问题的其他人发布一个“更正确”的答案。
For some reason, Eclipse needs administrator privileges in Windows 7 and Windows Vista machines. To do this one time, right-click the Eclipse executable or shortcut and click "Run as administrator"; to make it permanent, go to properties, the compatibility tab, and check the "Run this program as an administrator" box.
出于某种原因,Eclipse 在 Windows 7 和 Windows Vista 机器上需要管理员权限。为此,请右键单击 Eclipse 可执行文件或快捷方式,然后单击“以管理员身份运行”;要使其永久化,请转到属性、兼容性选项卡,然后选中“以管理员身份运行此程序”框。
Despite tharkun's post, perhaps he forgot, Eclipse doesn't have an installer; you simply unzip it. There is no reinstallation necessary. If you run Eclipse normally and find something wrong, and just discovered this answer, you can safely run Eclipse as administrator from now on and nothing will be broken as a result of you not having run as administrator up until this point.
尽管 tharkun 发了帖子,也许他忘记了,Eclipse 没有安装程序;你只需解压缩它。无需重新安装。如果您正常运行 Eclipse 并发现错误,并且刚刚发现了这个答案,那么从现在开始您可以安全地以管理员身份运行 Eclipse,并且在此之前您没有以管理员身份运行,因此不会有任何问题。
The problems with Eclipse that require administrator mode do not show up immediately, but for example if you check for updates with Eclipse running in non-administrator mode, Eclipse will claim that there are no update sites available. Also some GUI features will have problems.
Eclipse 需要管理员模式的问题不会立即出现,但例如,如果您在 Eclipse 以非管理员模式运行的情况下检查更新,Eclipse 将声称没有可用的更新站点。一些 GUI 功能也会有问题。
These problems are likely caused by some of the advanced UAC features meant to protect your system, such as UAC Virtualization. Eclipse can (and hopefully will) be fixed to write only to user space and "play nice" with other Windows applications, but for now we have to simply run it as administrator and trust that it's not taking advantage of the added privileges.
这些问题很可能是由一些旨在保护您的系统的高级 UAC 功能引起的,例如UAC 虚拟化。Eclipse 可以(并且有望)被修复为仅写入用户空间并与其他 Windows 应用程序“玩得很好”,但现在我们必须简单地以管理员身份运行它并相信它不会利用添加的特权。
As a sidenote, I just spent several hours trying to figure out how to get Eclipse to write inside the %AppData% directory, in hopes that it would solve this problem and allow Eclipse to be run in user mode, but I could not get Eclipse to honor anything I tried. Oh well...
作为旁注,我只是花了几个小时试图弄清楚如何让 Eclipse 在 %AppData% 目录中写入,希望它能解决这个问题并允许 Eclipse 在用户模式下运行,但我无法获得 Eclipse尊重我尝试过的任何事情。那好吧...
回答by John Peterson
eclipse require write permission to app folder
eclipse 需要对应用程序文件夹的写权限
it has to be in a folder with user write permission, f.e. %localappdata%\Eclipse. if u place it in %programfiles%\Eclipse it can't write to config files or plugins
它必须位于具有用户写入权限的文件夹中, fe %localappdata%\Eclipse。如果你把它放在 %programfiles%\Eclipse 它不能写入配置文件或插件
the app has no installer. it stores config files in the app folder by default. the official install path is "c:\eclipse" and they forgot to mention that write permission is required
该应用程序没有安装程序。默认情况下,它将配置文件存储在 app 文件夹中。官方安装路径是“c:\eclipse”,他们忘了说需要写权限
https://wiki.eclipse.org/Eclipse/Installation
Decompress this file into the directory of your choice (e.g. "c:\eclipse" on Windows) and ensure you have full Read and Execute permissions.
https://wiki.eclipse.org/Eclipse/Installation
将此文件解压缩到您选择的目录中(例如,Windows 上的“c:\eclipse”)并确保您具有完整的读取和执行权限。