How do I upgrade to Java 16
linux - How do I install Java OpenJDK 1.6.0_36 to CentOS 7.2 - Stack Overflow
How to install Java SDK on CentOS? - Stack Overflow
linux - centos 7 install java version 1.6.0_45 and PostgreSQL 9.3.16 - Stack Overflow
Videos
I am running a server on an Oracle VM (the tutorial for how to do so can be found here) and I was wondering if anyone knew how to upgrade to Java 16 as that is a requirement for 1.17. The best that I can figure out is that it is running CentOS however, I'm not actually sure.
You can install a specific version hosted from CentOS archive server.
- Update first
elrepo, to make sure that you will have the latest RPM repository for CentOS.
sudo yum update elrepo
- Then install the specific version from CentOS archive.
sudo yum install https://buildlogs.centos.org/c7.01.u/java-1.6.0-openjdk/20150730180723/1.6.0.36-1.13.8.1.el7_1.x86_64/java-1.6.0-openjdk-1.6.0.36-1.13.8.1.el7_1.x86_64.rpm
Note: This server contains a mix of raw/unsigned packages and/or build logs. It should be used mainly for testing purposes.
You can download here and search for Java SE Runtime Environment 6u41
The following command will return a list of all packages directly related to Java. They will be in the format of java-<version>.
$ yum search java | grep 'java-'
If there are no available packages, then you may need to download a new repository to search through. I suggest taking a look at Dag Wieers' repo. After downloading it, try the above command again.
You will see at least one version of Java packages available for download. Depending on when you read this, the lastest available version may be different.
java-1.7.0-openjdk.x86_64
The above package alone will only install JRE. To also install javac and JDK, the following command will do the trick:
$ yum install java-1.7.0-openjdk*
These packages will be installing (as well as their dependencies):
java-1.7.0-openjdk.x86_64
java-1.7.0-openjdk-accessibility.x86_64
java-1.7.0-openjdk-demo.x86_64
java-1.7.0-openjdk-devel.x86_64
java-1.7.0-openjdk-headless.x86_64
java-1.7.0-openjdk-javadoc.noarch
java-1.7.0-openjdk-src.x86_64
@Sventeck, perfecto.
redhat docs are always a great source - good tutorial that explains how to install JDK via yum and then setting the path can be found here (have fun!) - Install OpenJDK and set $JAVA_HOME path
OpenJDK 6:
yum install java-1.6.0-openjdk-devel
OpenJDK 7:
yum install java-1.7.0-openjdk-devel
To list all available java openjdk-devel packages try:
yum list "java-*-openjdk-devel"