简体   繁体   English

我应该在Windows上安装Eclipse的文件夹是什么?

[英]What folder should I install Eclipse to on Windows?

I'm running Windows 7 with UAC enabled . 我正在运行启用了UAC的 Windows 7。 I've always found it weird that Eclipse doesn'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. 我总是发现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. 我将eclipse文件夹复制到我的C:\\Program Files\\目录并在我的开始菜单上创建一个快捷方式,然后将其固定到我的任务栏。 However, eclipse has problems so I go to properties, the compatibility tab, and enable "Run as administrator". 但是,eclipse存在问题所以我转到属性,兼容性选项卡,并启用“以管理员身份运行”。 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. 然后每次我打开eclipse时我都必须在UAC窗口上按“是”,但一切正常,除了一个副作用:我的触摸板不会在eclipse中滚动任何窗口。 This is because the touchpad program is running as a normal user, so it can't modify eclipse running as administrator. 这是因为触摸板程序作为普通用户运行,因此无法修改以管理员身份运行的eclipse。 So, then I have to close and reopen my touchpad software as an administrator. 那么,我必须以管理员身份关闭并重新打开我的触摸板软件。

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目录并尝试这种方法,除非我在这里得到更好的答案。


Ninite places Eclipse in C:\\eclipse. Ninite将Eclipse放在C:\\ eclipse中。 Ever since asking this question, that has been my install location for Eclipse. 从那以后问这个问题,那就是我的Eclipse安装位置。 Eclipse still does not properly handle permissions when run out of the Program Files folder. 当Program Files文件夹用完时,Eclipse仍然无法正确处理权限。

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. 我将所有开源软件包(ANT,Maven,Apache等)保存在c:\\ software中。 Then I add the necessary directories to my $PATH variable (c:\\software\\ant\\bin). 然后我将必要的目录添加到我的$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,没有问题。

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 on c:\\prog\\java\\eclipse , a directory tree I create 你想要的任何地方(意味着你不必在c:\\Program Files安装它(我在例如c:\\prog\\java\\eclipse上安装它,我创建的目录树)
  • with a workspace set anywhere you want (for me: c:\\prog\\java\\workspace , and I reference that workspace in my eclipse.ini . 在任何你想要的地方设置工作区(对我来说: c:\\prog\\java\\workspace ,我在eclipse.ini中引用该工作区。
    This is important because the default location of a workspace (using user.home) is not always a good idea (see this SO question and its associated eclipse bug which will be solved only with the upcoming eclipse Helios 3.6) 这很重要,因为工作区的默认位置(使用user.home)并不总是一个好主意(请参阅此SO问题及其相关的eclipse错误 ,只有即将推出的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 ) 插件设置在你想要的任何地方通过Dropins文件夹 (也在eclipse.ini中引用,对我来说: 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 in c:\\prog\\java\\jdks ) JVM安装在你想要的任何地方 (也在eclipse.ini中引用,对我来说: c:\\prog\\java\\jdks\\jdk6u18 ,我在c:\\prog\\java\\jdks安装了其他几个c:\\prog\\java\\jdks

Eclipse shouldn't ever have to be in c:\\Program Files , and the setting describe above works perfectly with: Eclipse中不应该永远必须在c:\\Program Files ,并设置描述上面工作完美:

  • Vista or Seven, UAC fully activated Vista或Seven,UAC完全激活
  • XP, with no Administrator rights. XP,没有管理员权限。

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 Google Chrome,Python,GitHub Desktop,Discord和f.lux使用的常用安装路径
  • Only installs Eclipse for the current user profile. 仅为当前用户配置文件安装Eclipse。 (separate per-user settings) (单独的每用户设置)
  • Does not require administrator privileges 不需要管理员权限
  • Accessible as a default Windows environment variable ( %LocalAppData% ) 可作为默认Windows环境变量访问%LocalAppData%
  • Folder is designated specifically to hold application data 文件夹专门用于保存应用程序数据

You could put it under your User folder or My Documents folder, so you don't have to worry about permissions. 您可以将它放在“ User文件夹或“ My Documents文件夹下,这样您就不必担心权限了。 Then just add a link to your start menu / quick start / desktop and you will be good to go. 然后只需添加一个指向开始菜单/快速启动/桌面的链接,您就可以开始使用了。

I have many different versions of Eclipse and related products installed. 我安装了许多不同版本的Eclipse和相关产品。 So I have them installed as C:\\Eclipse\\... for Windows and /Eclipse/... under Mac and Linux. 所以我把它们安装为C:\\Eclipse\\... for Windows和/Eclipse/...在Mac和Linux下。 Usually with the directory name as the base name of the zip - eg eclipse-rcp-helios-SR2-macosx-cocoa-x86_64 ... Some products, like those from IBM, have their own ideas and can often not be changed... 通常使用目录名作为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/...和朋友之下。

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

相关问题 我应该安装什么来使用 c++ 中的命名空间 Windows::Devices? - What should I install to use namespace Windows::Devices in c++? windows 上的 msysgit — 如果有的话,我应该注意什么? - msysgit on windows — what should I be aware of, if any? 如何在Windows上使用MinGW安装/启用Eclipse的OpenMP? - How do I install/enable OpenMP for Eclipse with MinGW on Windows? Qt 5.5.1 for C ++ GUI应该安装什么? - What should I install with Qt 5.5.1 for C++ GUI? 我应该安装哪种c ++运行时可再发行程序包? - What kind of c++ runtime redistributable packages should I install? 我应该安装哪个版本的PyQt(32 vs 64) - What version of PyQt should I install (32 vs 64) 在 Visual Studio Code 中使用 JavaScript 创建 Windows 10 应用程序需要哪些扩展,还是应该只安装 Visual Studio? - What extensions do I need to create a Windows 10 app using JavaScript in Visual Studio Code or should I just install Visual Studio instead? 需要制作一个简单的Windows应用程序,我应该使用什么样的语言? - need to make a simple Windows app, what languague should I use? 在Windows上安装Bower on Vagrant需要什么权限? - What permissions do I need to install Bower on Vagrant on Windows? Mac / Windows Java应用程序应使用哪种打包工具? - What packaging tool should I use for a Mac/Windows Java app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM