Eclipse Installation in Ubuntu

  1. Open a terminal (Ctrl-Alt-T) and switch it to root permissions by entering:
    $ sudo su
  2. Make sure Eclipse Indigo is NOT installed in your Ubuntu. You may need to remove both "eclipse" and "eclipse-platform" packages to get rid of it. If it still gets into way when trying to install Luna using this easy way, you may need to look at the "hard way" below.
    # apt-get remove eclipse eclipse-platform
  3. Install a Java 1.7 JDK:
    # apt-get install openjdk-7-jdk
  4. Install Maven:
    apt-get install maven
  5. Get rid of the root access as you won't need it anymore:
    # exit
  6. Download Eclipse. The "for Java EE Developers", "for Java Developers" and "for RCP and RAP Developers" versions all seem to work. Currently the file which was tested to work is (note that it is for 64 bit Ubuntu version) available at this page
  7. Extract the Eclipse installation tarball into your home directory:
    $ cd
    $ tar -xzvf <path/to/your-tar-file>
  8. Increase the memory for the Eclipse installation by modifying the ~/eclipse/eclipse.ini file.
    • Change the -Xmx setting (line 20) to be AT least 1G, recommended 2GB. (i.e. -Xmx2048m).
    • Change the -XX:MaxPermSize (line 18) to at most 512m. If you have the -Xmx setting set to 1G, then I suggest to use a lower value, for example 300m.
  9. Run the Eclipse:
    $ ~/eclipse/eclipse
  10. If everything seems to work, then configure it to have an icon in Desktop
          paste below command into the terminal and hit enter.
     gksudo gedit /usr/share/applications/eclipse.desktop
 
         Above command will create and open the launcher file for eclipse with gedit text editor.
        Paste below content into the opened file and save it.
       [Desktop Entry]
       Name=Eclipse 4
       Type=Application
       Exec=/home/rajeev/eclipse/eclipse
       Terminal=false
       Icon=/home/rajeev/eclipse/icon.xpm
      Comment=Integrated Development Environment
      NoDisplay=false
      Categories=Development;IDE;
      Name[en]=Eclipse

 

1 comment: