views:

448

answers:

3

I'm running Windows 7 with UAC enabled. 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.

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.

Anyway, long story short... Where is the best place to put the eclipse folder in Windows, and why?


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.

+2  A: 

I setup Eclipse in

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).

I also keep the Eclipse workspace under 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.

NW Architect
And this works correctly with UAC enabled? If you look for software updates in Eclipse, it doesn't complain about no software sites? (this is a sign of not enough permissions, which happens when I don't run as administrator)
Ricket
I believe UAC is only a problem under C:\Program Files. There are some details in https://bugs.eclipse.org/168445 when this started being a problem in Vista. Personally, I install eclipse and related stuff under C:\Dev\
Andrew Niefer
A: 

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.

Justin Ethier
+1  A: 

You can install (unzip) an 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
  • 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 question and its associated eclipse bug which 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 in c:\prog\java\jdks)

Eclipse shouldn't ever have to be in c:\Program Files, and the setting describe above works perfectly with:

  • Vista or Seven, UAC fully activated
  • XP, with no Administrator rights.
VonC
Well I mean, I know it doesn't NEED to be installed in Program Files, I just don't create my own program folders, and UAC seems to guard the Program Files directory (same with the Windows folder and probably others) so that things need raised privileges to modify it. So in essence you are telling me to place Eclipse anywhere I want, that isn't protected by UAC.
Ricket
@Ricket: exactly. And not just Eclipse. Its workspace, plugins and JVM (both for executing Eclipse itself and for programming) can be placed anywhere you want, especially where UAC won't bother you.
VonC