我应该在 Windows 上将 Eclipse 安装到哪个文件夹?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2414181/
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
What folder should I install Eclipse to on Windows?
提问by Ricket
I'm running Windows 7 with UAC enabled. I've always found it weird that Eclipsedoesn't use an installer and doesn't use the AppData folder to store its data in Windows, but lately I've had to reinstall it a couple times (hard drive problems) and I've been wondering if I am really putting it in the best place.
我正在运行启用了 UAC 的Windows 7 。我一直觉得很奇怪Eclipse不使用安装程序,也不使用 AppData 文件夹将其数据存储在 Windows 中,但最近我不得不重新安装它几次(硬盘驱动器问题),我一直在想我是否真的把它放在了最好的地方。
I copy the eclipse folder to my C:\Program Files\
directory and make a shortcut on my start menu, and then pin it to my taskbar. However, eclipse has problems so I go to properties, the compatibility tab, and enable "Run as administrator". Then every time I open eclipse I have to hit yes on the UAC window, but everything works correctly, except for one side effect: my touchpad doesn't scroll any windows in eclipse. This is because the touchpad program is running as a normal user, so it can't modify eclipse running as administrator. So, then I have to close and reopen my touchpad software as an administrator.
我将 eclipse 文件夹复制到我的C:\Program Files\
目录并在我的开始菜单上创建一个快捷方式,然后将其固定到我的任务栏。但是,eclipse 有问题,所以我转到属性,兼容性选项卡,并启用“以管理员身份运行”。然后每次我打开 eclipse 时,我都必须在 UAC 窗口上点击是,但一切正常,除了一个副作用:我的触摸板不会在 eclipse 中滚动任何窗口。这是因为触摸板程序是以普通用户身份运行的,所以无法修改以管理员身份运行的eclipse。因此,我必须以管理员身份关闭并重新打开我的触摸板软件。
Anyway, long story short... Where is the best place to put the eclipse folder in Windows, and why?
无论如何,长话短说......在Windows中放置eclipse文件夹的最佳位置在哪里,为什么?
Edit: I just found a possible suggestion, feel free to comment. Sounds like I can just run it as administrator once the first time and set up all my plugins and such, and then run it as a normal user for my normal tasks (coding). I can't believe I never thought of doing this, but I may stick to the Program Files directory and give this approach a try unless I get a better answer here.
编辑:我刚刚找到了一个可能的建议,请随时发表评论。听起来我可以第一次以管理员身份运行它并设置我的所有插件等,然后以普通用户身份运行它来执行我的正常任务(编码)。我不敢相信我从未想过这样做,但我可能会坚持使用 Program Files 目录并尝试这种方法,除非我在这里得到更好的答案。
Niniteplaces Eclipse in C:\eclipse. Ever since asking this question, that has been my install location for Eclipse. Eclipse still does not properly handle permissions when run out of the Program Files folder.
Ninite将 Eclipse 放在 C:\eclipse 中。自从提出这个问题以来,这一直是我安装 Eclipse 的位置。当 Program Files 文件夹用完时,Eclipse 仍然无法正确处理权限。
采纳答案by LG_PDX
I setup Eclipse in
我在 Eclipse 中设置
c:\software\eclipse_{version}\
I keep all my open source packages (ANT, Maven, Apache, etc) in c:\software as well. Then I add the necessary directories to my $PATH
variable (c:\software\ant\bin).
我也将所有开源包(ANT、Maven、Apache 等)保存在 c:\software 中。然后我将必要的目录添加到我的$PATH
变量 (c:\software\ant\bin)。
I also keep the Eclipse workspace under c:\software\eclipse_workspace
.
我还将 Eclipse 工作区保留在c:\software\eclipse_workspace
.
The big plus behind this setup is portability. I can simply move the entire folder to a new drive, re-setup my path, and boom everything works. No interference from registry settings at all. Makes it very easy to backup.
这种设置背后的一大优点是便携性。我可以简单地将整个文件夹移动到一个新驱动器,重新设置我的路径,然后一切正常。完全不受注册表设置的干扰。使备份变得非常容易。
This approached worked for XP, Windows7 RC1 and Windows7 Professional without issue.
这种方法适用于 XP、Windows7 RC1 和 Windows7 Professional,没有问题。
回答by VonC
You can install (unzip) an eclipse:
您可以安装(解压缩)eclipse:
- anywhere you want (meaning you don't have to install it on
c:\Program Files
(I install it for instance onc:\prog\java\eclipse
, a directory tree I create - with a workspace set anywhere you want (for me:
c:\prog\java\workspace
, and I reference that workspace in my eclipse.ini.
This is important because the default location of a workspace (using user.home) is not always a good idea (see this SO questionand its associated eclipse bugwhich will be solved only with the upcoming eclipse Helios 3.6) - with plugins set anywhere you want through a Dropins folder(also referenced in the eclipse.ini, for me:
c:\prog\java\myplugins
) - with a JVM installed anywhere you want(also referenced in the eclipse.ini, for me:
c:\prog\java\jdks\jdk6u18
, and I have installed several others jdks inc:\prog\java\jdks
)
- 您想要的任何地方(意味着您不必将其安装在
c:\Program Files
(例如c:\prog\java\eclipse
,我将其安装在我创建的目录树上) - 在您想要的任何位置设置工作区(对我来说:
c:\prog\java\workspace
,我在eclipse.ini 中引用了该工作区。
这很重要,因为工作区的默认位置(使用 user.home)并不总是一个好主意(请参阅此SO 问题及其相关的日食错误,只有即将推出的日食 Helios 3.6 才能解决) - 与插件设置任何你想要通过的dropins文件夹(在的eclipse.ini还提到,对我来说:
c:\prog\java\myplugins
) - 与安装JVM任何你想要的(也是在引用的eclipse.ini,对我来说:
c:\prog\java\jdks\jdk6u18
和我已经安装了其他几个人的JDK中c:\prog\java\jdks
)
Eclipse shouldn't ever haveto be in c:\Program Files
, and the setting describe above works perfectly with:
Eclipse中不应该永远都将在c:\Program Files
,且设置描述上述工程与完美:
- Vista or Seven, UAC fully activated
- XP, with no Administrator rights.
- Vista 或 7,UAC 完全激活
- XP,没有管理员权限。
回答by Stevoisiak
I usually install Eclipse to %LocalAppData%.
我通常将 Eclipse 安装到%LocalAppData%。
C:\Users\<username>\AppData\Local\Eclipse\<version>\
- Common install path used by Google Chrome, Python, GitHub Desktop, Discord, and f.lux
- Only installs Eclipse for the current user profile. (separate per-user settings)
- Does not require administrator privileges
- Accessible as a default Windows environment variable(
%LocalAppData%
) - Folder is designated specifically to hold application data
- Google Chrome、Python、GitHub Desktop、Discord 和 f.lux 使用的通用安装路径
- 仅为当前用户配置文件安装 Eclipse。(单独的每个用户设置)
- 不需要管理员权限
- 可作为默认Windows 环境变量(
%LocalAppData%
) 访问 - 文件夹专门用于保存应用程序数据
回答by Justin Ethier
You could put it under your User
folder or My Documents
folder, so you don't have to worry about permissions. Then just add a link to your start menu / quick start / desktop and you will be good to go.
您可以将它放在您的User
文件夹或My Documents
文件夹下,这样您就不必担心权限问题。然后只需添加一个链接到您的开始菜单/快速启动/桌面,您就可以开始了。
回答by Tonny Madsen
I have many different versions of Eclipse and related products installed. So I have them installed as C:\Eclipse\...
for Windows and /Eclipse/...
under Mac and Linux. Usually with the directory name as the base name of the zip - e.g. eclipse-rcp-helios-SR2-macosx-cocoa-x86_64
... Some products, like those from IBM, have their own ideas and can often not be changed...
我安装了许多不同版本的 Eclipse 和相关产品。所以我C:\Eclipse\...
在 Windows 和/Eclipse/...
Mac 和 Linux 下安装了它们。通常以目录名作为 zip 的基本名称 - 例如eclipse-rcp-helios-SR2-macosx-cocoa-x86_64
......一些产品,如来自 IBM 的产品,有自己的想法,通常无法更改......
As for the workspaces - yes, I have one for each customer - they are placed under /Eclipse/Workspaces/...
and friends.
至于工作区——是的,我为每个客户准备了一个——它们被放在/Eclipse/Workspaces/...
和朋友的下面。
And the target platforms are placed under /Eclipse/TargetPlatforms/...
and friends.
并且目标平台都放在/Eclipse/TargetPlatforms/...
和朋友下。