How to install Java 7 or jkd 7 on Ubuntu 16.04?

8,564

I agree with @user unknown's comment, you should be trying to move towards a supported JDK, like version 8. If you just need to get single command working real quick, a one-time thing, then you can still easily install JDK 1.7, albeit an out-of-date version. It doesn't have the security updates, but it does get the JDK installed and working. I just tested this for myself for you, on a new Ubuntu 16 vagrant box:

sudo add-apt-repository ppa:openjdk-r/ppa  
sudo apt-get update   
sudo apt-get install openjdk-7-jdk 

This was copied from https://askubuntu.com/a/761527/283173. You should really go there and see all the comments about that PPA. This isn't something you should be doing for a production system. Moving towards version 8 is the smarter move.

Share:
8,564

Related videos on Youtube

Gagan
Author by

Gagan

Updated on September 18, 2022

Comments

  • Gagan
    Gagan over 1 year

    I'm really in trouble. As the Java 7 support and built are not available anymore on the web. I have gone through many of resources and question answering websites online but unable to resolve this issue.

    I'm a non-technical person and recently have installed the Ubuntu 16.04. I want to unzip the files of my data backup. The size of files is 60 GB and 80 GB. The default archive manager in Ubuntu is unable to unzip the files or I am using the wrong method to do that.

    Can anyone please help me in this case?

    • datacarl
      datacarl about 6 years
      Why do you want to use an unsupported JDK? How do you try to unzip the archive you find? What's the error message, exactly (copy/paste)?
  • Gagan
    Gagan about 6 years
    Hi Boom Shadow, thanks to reply but I have gone through this practice but it is not working in my case. Can you please advice anything else from your experiences?
  • BoomShadow
    BoomShadow about 6 years
    Hmm. I spun up a new Ubuntu 16 virtual machine and ran those commands. It installed a working JDK 1.7 just fine for me. I know your actual goal is to unpack some files. Your question, as its written, is about Java install and the admins have closed it as a duplicate. I would recommend that you open a new question concerning unpacking of the files. In the new question, show the command (or process) you are using and what the error is.