1. Install Java
(1) Add the source first:
sudo gedit/etc/apt/sources.list
In the open file, add the following and save:
Deb Http://ppa. Launchpad. Net/webupd8team/java/ubuntu xenial Main
Deb-src Http://ppa. Launchpad. Net/webupd8team/java/ubuntu xenial main
(2) Installation key:
< Span class= "Hljs-preprocessor" >sudo apt-key Span class= "hljs-comment" >adv -- keyserver hkp://keyserver.ubuntu. com:80 --recv -keys EEA14886
(3) Execution:
sudo apt-get update
(4) Run the Install command to start installing Java:
sudo apt-get install Oracle-java8-installer Oracle-java8-set-default
sudo apt-get install --no-install-recommends Oracle-java8-installer
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > (5) View installation results:
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > java-version
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > javac-version
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > (6) path configuration
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > Open. bashrc file:
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > gedit. BASHRC
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > add a path to the open file and save:
< Span class= "Hljs-attribute" > export Java_home=/usr/lib/jvm/java-8-oracle
export JRE_ Home=${java_home}/jre
export Classpath=.:${java_home}/lib:${JRE_HOME}/lib
export path=${java_home}/bin: $PATH
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > < Span class= "Hljs-keyword" >< Span class= "hljs-variable" >2 , install eclipse
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > < Span class= "Hljs-keyword" >< Span class= "hljs-variable" > (1) Download the eclipse C + + installation package from the official website to local
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > < Span class= "Hljs-keyword" >< Span class= "hljs-variable" > (2) Unzip the installation package
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > < Span class= "Hljs-keyword" >< Span class= "hljs-variable" > (3) Move Eclipse to/usr/local:
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > < Span class= "Hljs-keyword" >< Span class= "hljs-variable" > sudo mv <path>/eclipse/usr/local
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > < Span class= "Hljs-keyword" >< Span class= "hljs-variable" > (4) Run
< Span class= "Hljs-attribute" > < Span class= "Hljs-attribute" > < Span class= "Hljs-keyword" >< Span class= "hljs-variable" >/ Sur/local/eclipse/eclipse
Unbuntu 16.04.2 Installing the Eclipse C + + development environment