Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The yum command manages the the dependences, that's why we use it instead of rpm.

You can check you have the right version on your system and see something like that.

Code Block
$ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)


If no you may have OpenJDK installed by default on your system, like this.

Code Block
$ java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)


It's normal, to use the right version you must manage the symbolic links with the command alternatives, it will automatically create symbolic links with the version of your choice.

Code Block
$ sudo alternatives --config java

There are 3 programs which provide 'java'.

Sélection    Commande
----------------------------------------------
*  1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre/bin/java)
   2           java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.161-2.6.12.0.el7_4.x86_64/jre/bin/java)
 + 3           /usr/java/jdk1.8.0_151/jre/bin/java
Enter to keep the current selection[+], or type selection number:3

Now you are using the Oracle



For maven I followed this guide instead: http://preilly.me/2013/05/10/how-to-install-maven-on-centos/

...