2..sudo apt-get update (then update the system package cache to install OpenJDK 8) sudoapt-get install OpenJDK-8-JDK ().
3.Sudo Update-Alternative-Configure java (View Java English Information)
4. sudo update-alternatives-config javac (view java Chinese information)
5.java-version (View java version information)
If the running matches the following environment similar to your jdk8.
Openjdk version "1. 8. 0 _ 0 1- internal"
OpenJDK runtime environment (build1.8.0 _ 01-internal-b04)
OpenJDK 64-bit server virtual machine (build 25.40-b08, mixed mode)
2. sudoapt-get installvim installvim (configure Java environment ant environment and AndroidSDK environment). Please refer to this blog for details.
Ant version
Apache Ant(TM) version 1.9.7 was compiled on 20 151February 20th.
When you enter the above command, you have successfully configured the java environment, a scripting environment.