How can I downgrade java 7 to update 67 as suggested by this Check Point issue?

I need this to install Check Point VPN.

I have to install Java 7u67. How can I do it? How can I install specific version of Java.

Now I have Java 8u25 and Java 7u72 when I install with the default installer.

I have this issue using Ubuntu 14.10.



Go to official java download page, scroll down to the bottom of the page until you see Previous Releases. Click Download

enter image description here

Choose Java SE 7 on the next page and you will see web-page where you can choose specific Java version. If you unsure what to choose, choose Development Kit - it will cover all your needs

enter image description here

Now you will get this page. And you see something like screenshot below. Choose tar.gz depending on your architecture, I highlighted two of them that fits Ubuntu:

picking java

Oracle may ask you to sign up before download


Now you have file jdk*.tar.gz. Here is great manual about installing java. I took out the instruction and changed it a little bit.

  • Uncompress .tar.gz

    tar -xvf jdk*

The JDK package is extracted into jdk.xxx directory. Check carefully this folder name, because we will use it the next step. I'm assuming that path to this new extracted folder is path_to_jdk_folder and folder name is folder_name, you should manually change it before executing commands below.

Usually it is:

path_to_jdk_folder - /home/c0rp/Downloads/jdk1.7.0

folder_name - jdk1.7.0

  • Installing

Run sudo update-alternatives --list java to check if you have configured java already.

$ sudo update-alternatives --list java

If it is saying update-alternatives: error: no alternatives for java run this set of commands. Don't forget replace path_to_jdk_folder and folder_name:

sudo mkdir /usr/lib/jvm
sudo mv path_to_jdk_folder /usr/lib/jvm/folder_name
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/folder_name/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/folder_name/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/folder_name/bin/javaws" 1
sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws

If there is no errors and your java list is not empty, run this set of commands. Don't forget replace path_to_jdk_folder and folder_name:

LNUM=$[$(update-alternatives --list java | wc -l) + 1]
sudo mv path_to_jdk_folder /usr/lib/jvm/folder_name
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/folder_name/bin/java" "$LNUM"
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/folder_name/bin/javac" "$LNUM"
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/folder_name/bin/javaws" "$LNUM"
  • Run

    sudo update-alternatives --config java

You will see output similar to the one below - choose the number of new jdk1.7.0 (folder_name) - for example 2 in this list (unless you have have never installed Java in your computer in which case a sentence saying There is nothing to configure will appear):

    $ sudo update-alternatives --config java
    There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
  0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/jdk1.7.0/bin/java                   1         manual mode
* 3            /usr/lib/jvm/jdk1.8.0/bin/java                   1         manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/jdk1.8.0/bin/java to provide /usr/bin/java (java) in manual mode

Repeat the above for:

sudo update-alternatives --config javac
sudo update-alternatives --config javaws

Check installation

java -version
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.