1

I want to download Java version "1.6.0_36" in CentOS. I tried sudo yum install java-1.6.0-openjdk, but it returned Java version 1.6.0_41. How do I install a specific version?

Can it be downloaded from the terminal directly?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
DorkyDork
  • 33
  • 6
  • Does this answer your question? [How to install Jdk in centos](https://stackoverflow.com/questions/20901442/how-to-install-jdk-in-centos) – Jon Sampson Sep 30 '21 at 01:23
  • By the way, be aware that [Java 16 reaches end-of-life in October](https://www.oracle.com/java/technologies/java-se-support-roadmap.html). Supplanted by Java 17 that came out mid-September. Java 17 is designated a [Long Term Support (LTS)](https://en.wikipedia.org/wiki/Long-term_support) version. – Basil Bourque Sep 30 '21 at 04:51
  • @BasilBourque sure.. but this question is about 1.6 (aka 6). That's been EOL for years already. – omajid Oct 02 '21 at 01:44

2 Answers2

2

You can install a specific version hosted from CentOS archive server.

  1. Update first elrepo, to make sure that you will have the latest RPM repository for CentOS.
sudo yum update elrepo
  1. 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.

Donnald Cucharo
  • 3,866
  • 1
  • 10
  • 17
Bryan L
  • 550
  • 1
  • 9
  • holy smokes! it actually worked for me. i wasnt able to update this "elrepo" though. thank you very much – DorkyDork Sep 30 '21 at 03:37
-1

You can download here and search for Java SE Runtime Environment 6u41

tpnoon
  • 35
  • 3
  • thanks! can it be downloaded from the terminal directly? – DorkyDork Sep 30 '21 at 01:12
  • It's a specific version. You can download it form the link and use this command to install it. `sudo yum localinstall .rpm` about the command you can have a look at [this](https://serverfault.com/questions/940791/whats-the-difference-between-yum-install-local-path-and-yum-localinstall). – tpnoon Sep 30 '21 at 01:18
  • hi @tpnoon is there a 36 version? what i currently have is tha 41 version – DorkyDork Sep 30 '21 at 01:58
  • I saw versions 35 and 37. I think it's not supported by Oracle – tpnoon Sep 30 '21 at 02:55