Skip to content

Installing Eclipse

Andersonmozart edited this page Jun 1, 2022 · 15 revisions

Install Java

((Obs.1:)) This is the java-Oracle, normally, the Ubuntu SO already has the java OpenJDK installed, if you have some preference using the OpenJDK, check the process of eclipse installation with the OpenJDK.

((Obs.2:)) This process only installs and sets the Java Oracle as the main JAVA, the OpenJDK will not be removed. Use the command (({java -version})) to check your java.

((*BE CAREFUL!! Removing OpenJDK can remove dependencies!(eg.: Cuda).*))

((Obs.3:)) Check if this is the newer “Java stable” available, if it isn’t, install the newer and update this tutorial.

Ubuntu 16.04

sudo add-apt-repository ppa:linuxuprising/java
sudo apt update && sudo apt install oracle-java13-set-default

Ubuntu 18.04

sudo add-apt-repository ppa:linuxuprising/java
sudo apt update && sudo apt install oracle-java14-set-default

To set the JAVA_HOME environment variable, first, you need to find out the Java installation paths using the update-alternatives command:

sudo update-alternatives --config java

One example of installation path is:

/usr/lib/jvm/java-13-openjdk-amd64/bin/java

Edit the file /etc/environment:

sudo gedit /etc/environment

Add to the end of the file (modify according to the path returned by the update-alternatives command above):

JAVA_HOME=/usr/lib/jvm/java-13-openjdk-amd64

Install Eclipse

Download the Eclipse IDE for C/C++ Developers from:

https://www.eclipse.org/downloads/eclipse-packages/

Unzip eclipse:

cd Downloads/
sudo mv eclipse-cpp-mars-1-linux-gtk-x86_64.tar.gz  /opt
cd /opt/
sudo tar -xvf eclipse-cpp-mars-1-linux-gtk-x86_64.tar.gz

To remove the install file

sudo rm eclipse-cpp-mars-1-linux-gtk-x86_64.tar.gz

Create a desktop link e edit it in /usr/share/applications:

sudo gedit /usr/share/applications/eclipse.desktop

Put the content below in file :

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

Para instalar a extensão PyDev para permitir a edição de scripts Python no Eclipse, siga os passos da seção “Installing with the update site” em www.pydev.org/manual_101_install.html .

Clone this wiki locally