Eclipse setup

Archived

This page has been archived and will receive no further updates.

  1. Download Eclipse (minimal installation)

    1. Go here: http://download.eclipse.org/eclipse/downloads/

    2. Under Latest Release click the version number

    3. Scroll down to Platform Runtime Binary (this downloads a minimal installation) and download the latest Linux (x86_64/GTK+) release

  2. Extract the download

    tar xvf eclipse-platform...tar.gz
    sudo mv eclipse /opt
    
  3. Specify the Java version (so it doesn’t break if the default system Java gets changed)

    sed -i.bak 's#-vmargs#-vm\n/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java\n-vmargs#' /opt/eclipse/eclipse.ini
    
  4. Adjust heap size, if necessary/desired

    • To adjust it from the default of 512 MB to 1 GB:
      sed -i 's/^-Xmx512m$/-Xmx1024m/g' /opt/eclipse/eclipse.ini
      
  5. If necessary, create an application launcher icon (for Unity, Xfce, etc)

    echo "[Desktop Entry]
    Type=Application
    Name=Eclipse
    Icon=/opt/eclipse/icon.xpm
    Exec=/opt/eclipse/eclipse
    Terminal=false" >> ~/.local/share/applications/eclipse.desktop
    
  6. Install additional features/plugins

    1. Help > Install New Software

    2. Install features in Eclipse repository

      1. Work with > name of current Eclipse version (e.g. Luna)

      2. Check any desired features

        • Java

          • Eclipse Java Development Tools > Eclipse Java Development Tools
        • PHP

          1. Programming Languages > PHP Development Tools (PDT)
        • SVN (Subversive)

          1. Collaboration > Subversive SVN Team Provider
        • XML

          1. Programming Languages > Eclipse XML Editors and Tools
      3. Click Next, and then follow the instructions to complete installation

      4. Further instructions for SVN

        1. While waiting, install libsvn-java and subversion
          sudo apt-get -y install libsvn-java subversion
          
        2. Then get svn version
          svn --version
          
        3. Set the path to the Java SVN libraries

          sed -i 's#-vmargs#-vmargs\n-Dsubversion.native.library=/usr/lib/x86_64-linux-gnu/jni/#' /opt/eclipse/eclipse.ini
          
        4. Once Eclipse restarts, Open Perspective > Other > SVN Repository Exploring

        5. A window should pop up with different subversive SVN connectors

        6. Check the version of the JavaHL connector (SVNKit is slower and uses more memory) that corresponds with the version of subversion you have installed, click Finish, and then follow the instructions to complete installation
    3. Install other plugins

      1. Pydev (Python)

        http://pydev.org/updates/

      2. Android

        http://developer.android.com/sdk/installing/installing-adt.html

        If you get the error “sdk platform tools is missing”: “SDK Platform Tools component is missing!”

  7. Window > Preferences > General > Editors > Text Editors > Spelling > uncheck Enable spell checking > OK
  8. Window > Preferences > General > Startup and Shutdown > uncheck all plugins > OK

  9. Use dark theme, if desired

    1. Change Eclipse to the dark theme

      • Window > Preferences > General > Appearance > Theme > Dark
    2. Fix plugin colors

  10. Configure editors

    • Java

      1. Window > Preferences > Java > Code Style > Formatter > Edit

      2. Profile name > Custom

      3. Indentation > Tab policy > Spaces only

      4. Line Wrapping > check Never join already wrapped lines > OK

      5. Java > Editor > Save Actions > check Perform the selected actions on save, Format source code, Additional actions > Configure

      6. Check Remove trailing whitespace, Correct indentation > OK

      7. Java > Code Style > Clean Up > Edit

      8. Code Organizing > check Format source code, Remove trailing whitespace, Correct indentation, Organize imports > Profile name > Custom > OK > OK