Saturday, January 10, 2015

Eclipse - Ubuntu - Setup - Install Eclipse on Ubuntu OS

Environment:
OS: Ubuntu 14.04 64-bit
Eclipse: Luna 4.4 64-bit


Install Eclipse:


  • Make sure Java is installed. I have another post how to do so (see Resource-01)
  • Download Eclipse installer. URL="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-jee-luna-R-linux-gtk-x86_64.tar.gz"
  • Extract the file.
    using command in terminal: tar -zxvf eclipse-jee-luna-R-linux-gtk-x86_64.tar.gz
    using Archive Manager UI tool
  • Copy extracted folder to "/opt".
    Command: sudo mv eclipse /opt
Start eclipse:
  • From terminal
    1. Open terminal (shortcut ctrl+alt+t)
    2. Go to location "/opt/eclipse"
    3. Run executable "./eclipse"
  • From file browser
    1. Open file browser
    2. Go to location "/opt/eclipse"
    3. Double click on eclipse icon
  • Create desktop file and install. This will help opening eclipse from unity launcher (see Resource-02, Resource-03)
    1. Create eclipse desktop file
      Command: "gedit eclipse.desktop"
    2. Type following the file

      [Desktop Entry]
      Name=Eclipse Luna
      Type=Application
      Exec=/opt/eclipse/eclipse
      Terminal=false
      Icon=/opt/eclipse/icon.xpm
      Comment=Java Integrated Development Environment
      NoDisplay=false
      Categories=Development;IDE;
      Name[en]=Eclipse Luna

      Note: See Note-01, Note-03 for more information if desktop file not behaving as expected
    3. Execute the desktop file
      Command: "sudo desktop-file-install eclipse.desktop"
    4. Give eclipse permission to modify osgi file
      Command: "sudo chown -R $USER:$USER
      /opt/eclipse/configuration/org.eclipse.osgi
      "
    5. Give desktop file permission to execute (see Note-02)
      Command: "chmod a+x eclipse.desktop"
Notes:
  1. If icon is not displayed - icon file name cannot have extension unless full path is specified
  2. If desktop file is not displaying name mentioned in file. Showing 'eclipse.desktop' instead of 'Eclipse Luna' - desktop file's execution permission not set.
  3. Getting 'There was an error launching the application' - value mention in desktop file for Exec is not correct

Resources:
  1. How to install java - http://peerprogrammer.blogspot.com/2014/02/java-setup-install-java-in-ubuntu.html
  2. unity launcher - https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles
  3. How to create desktop file - http://askubuntu.com/questions/281293/creating-a-desktop-file-for-a-new-application

No comments: