Oracle Java 7 Installation on Ubuntu 16.04.2 64 Bit

in #ubuntu7 years ago

I was trying to install Oracle Java 7 on Ubuntu 16.04.2 64 bit . There are lots of guides on internet but I didn't succeeded. I was getting error "dpkg: error processing package oracle-java7-installer". Finally from lots of search and troubleshooting I was able to install as per following method :-

First cleanup old broken installation:

sudo apt-get purge oracle-java7-installer
sudo rm /etc/apt/sources.list.d/java

Now do manual installation.
Download server-jre-7u80-linux-x64.tar.gz from Oracle Java web site.

wget http://download.oracle.com/otn/java/jdk/7u80-b15/server-jre-7u80-linux-x64.tar.gz

Unzip downloaded package

tar zxvf server-jre-7u80-linux-x64.tar.gz

Move package

mv jdk1.7.0.80/ /opt

Configure java

update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_80/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_80/bin/javac 1
update-alternatives --set java /opt/jdk1.7.0_80/bin/java
update-alternatives --set javac /opt/jdk1.7.0_80/bin/javac
java -version

That's it, I got working Oracle Java 7 on Ubuntu 16.04.2 64 bit. May be this will help someone else.

If you like please upvote.

Sort:  

upvoted my friend ....... check mine as well if you like https://steemit.com/@moneyforyou ........... all new members should help each other as the ones who make money usually neglect us

Thanks, just checking your post :)

Nice work, certain packages can be a pain to work with on 'nix.
Yes I'm looking in your direction PPA :P

Nice, it helped me lot. thx.

Coin Marketplace

STEEM 0.25
TRX 0.20
JST 0.036
BTC 94745.85
ETH 3468.48
USDT 1.00
SBD 3.48