Eclipse Juno, need root access everytime I change the configuration

I am trying to install eclipse Juno on 12.04. I did all the things instructed in this link.

But whenever I install any new software (Say CDT or Pydev) on Eclipse, the new softwares are gone upon opening the Eclipse app again. I then have to open Eclipse again with root privileges to install all the software.

I also ran into many problems with linking the include library for Eclipse CDT.

Can anyone help me with installing Juno in a way that I do not need root access every time I change configurations in Eclipse?


Solution 1:

How to install Eclipse Juno WITHOUT the need to change permissions

  1. First, remove all previous versions of Eclipse. If you would like: save your /workspace directory (cut and post the entire directory into your ~/
  2. Download Eclipse from their official website (I used "eclipse-mobile-juno-linux-gtk-x86_64.tar.gz")
    But like was stated earlier, make sure that you have 32 and/or 64 bit versions of java available to match your Eclipse install. (I have BOTH openjdk-6 and -7-jre installed from Synaptic Package Manager)
    • You can add package pieces later if the eclipse-mobile installation doesn't contain everything you want. For example, Linux Tools here.
    • Other package instructions are available from the download page, via the links on the left.
  3. To avoid permissions issues, I unpacked it to ~/bin and archive manager put Eclipse into its own 'eclipse' subdirectory there.
  4. Download the Android SDK, and so that future upgrades of Eclipse and Ubuntu don't break it, unpack it to ~/bin/eclipse/dropins.
  5. Developer.android.com instructs you to:

    On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk.

  6. However, when I downloaded the linux version of Android SDK, there was no file "android sdk."
  7. Instead, navigate to to the tools path (in my case ~/bin/eclipse/dropins/android-sdk-linux/tools) and [right-click] on "android" to change its properties to executable.

    android file properties dialog: permissions tab
  8. Now you can double-click to run android, and download the packages you like.
    • Since everything is in your home directory, you don't need to modify your PATH environment variable (as per the developer instructions).
  9. Download and install the ADT plugin from http://developer.android.com/sdk/installing/installing-adt.html as per the normal instructions.
    • Configure the plugin with the path used, in this example /home/clayton/bin/eclipse/dropins/android-sdk-linux
    • If you want to install more packages from step-8 after step-9, from the Eclipse drop-down menu choose Window > Android SDK Manager
  10. Navigate to ~/bin/eclipse and make sure you mark "eclipse" as executable as well (see step 7 for a refresher). [Right-click] and [Make link]. Move this shortcut to the desktop.
    • I went to the extra step of changing the icon for eclipse to the provided "icon.xpm" in the same subdirectory.
  11. From step 1, move your "workspace" directory...or don't. But specify it as your application workspace in the dialog and you'll be able to import any existing projects with ease (those instructions would be for a different Q&A).

Solution 2:

It is not possible to use your downloaded file with the Ubuntu Software Center since it needs prepackaged files matching your Ubuntu version.

However, the current version of Eclipse in Ubuntu is 3.7.2. If you want to use the current one (4.2), you have to install it manually.

To see how this is done, please see Eclipse Juno, need root access everytime I change the configuration.

Solution 3:

Silly question, but... did you run the following, as stated in the link you posted?

chown -R USER:USER eclipse

This would allow you to run eclipse as USER and make configuration changes.

You can verify that all files in the installed directory are owned by USER by doing a search of the entire install directory (/opt/eclipse)

find /opt/eclipse/ | xargs ls -ld | grep -v USER

This shouldn't return anything if everything is owned by USER