In the local test environment to install plug-ins, found that the use of Java, although a programmer, but no use of Java Ah, hey, but the plug-in use Ah, how to do ah? Dress yourself.
One, own system: CentOS 7
1. Check to see if CentOS has its own JDK installed.
Yum List installed |grep Java
Show empty: If there is a JDK that comes with your own installation,
Uninstalling JDK-related file input: yum-y remove java-1.7.0-openjdk*
Uninstall Tzdata-java Input: Yum-y remove Tzdata-java.noarch.
Display: complete! All right, go on,,,,
2. List the Java installation packages in the Yum Library
Yum-y List java*
Show:
3. Install the Java environment using Yum.
Yum-y Install java-1.8.0-openjdk* (I need 1.8.0 or later, so take this as an example)
Display: complete! All right, go on,,,,
4. View the installed Java version
Java-version
Show:
Second, the online system ubuntu16.04
1. Check if Java is installed
Java-version Display: 2, installing the Java 2.1 installation JREsudo apt-get install default-JRE 2.2 Installing OpenJDKsudo apt-get install openjdk-8-jdk 3. Check the Java versionjava -version Show:
Installation is successful!
Installing Java under Linux (CentOS and Ubuntu)