openjdk8的安装

sudo add-apt-repository ppa:openjdk/ppa
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-jre openjdk-8-jdk-headlesss




sudo update-alternatives –config java
sudo update-alternatives –config javac

@ubuntu:~/openjdk$ sudo update-alternatives --config javac
There are 3 choices for the alternative javac (providing /usr/bin/javac).


  Selection    Path                                         Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-8-openjdk-amd64/bin/javac   1069      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1051      manual mode
  2            /usr/lib/jvm/java-7-oracle/bin/javac          1         manual mode
  3            /usr/lib/jvm/java-8-openjdk-amd64/bin/javac   1069      manual mode


Press enter to keep the current choice[*], or type selection number: 
@ubuntu:~/openjdk$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).


  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      manual mode
  2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1         manual mode
  3            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      manual mode


Press enter to keep the current choice[*], or type selection number: 
@ubuntu:~/openjdk$








你可能感兴趣的:(android)