1. View JDK version
Java-version
2. Place the downloaded JDK in the/USR/LIB/JVM (where the JVM is its own name)
sudo mv JDK1.8.0_111/USR/LIB/JVM
3, configure the environment variables (note which user is configured, this is the configured user variables, not system variables, system variables with vim/etc/profile)
(1) Open BASHRC
Gedit ~/.BASHRC
(2) Add the following configuration information to BASHRC
Export java_home=/usr/lib/jvm/jdk1.8.0_111 (This is the address where the user unzipped the JDK)
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
(3) Note save, and then use the following command to make the environment variable effective
SOURCE ~/.BASHRC
(4) Enter Env or java-version to see if it is successful
The above can be replaced with sudo apt-get install OPENJDK-7-JDK, but to configure something else (recommended with the above)
Problems installing eclipse: Eclipse cannot find JRE or JDK
$ cd <eclipse dir>
$ ln-sf $JRE _home JRE
The goal is to create a link in the Eclipse installation directory called the JRE that points to the JRE directory in the Java installation directory.
Configuration of Java development environment under Linux system (not finished ... )