How to install Oracle JRE and make it the default JRE on Ubuntu 14.04

Ubuntu Oracle JRE

A few hours ago I had to install DataStax OpsCenter from the DataStax (community) repository on a new installation of Ubuntu 14.04. DataStax OpsCenter is a browser-based management application for DataStax Enterprise, DataStax Community and Apache Cassandra, a distributed NoSQL database.

Cassandra/OpsCenter requires Oracle JRE, but applications installed using Ubuntu’s package manager are hard-wired to use OpenJDK JRE. So if Oracle JRE is installed, it has to be configured to be the default JRE, before or after the installation of OpsCenter. This post show how to get that task done.

To install Oracle JRE, visit the official download page and click on the JRE button for the version of JRE you want to download. For this tutorial, I clicked on the JRE button under the Java SE 7u67 section to download the JRE 1.7 version. On the page that comes up after that, accept the license and download the gzipped tarball for the 64-bit platform (recommended)

Related Post:  NVIDIA Tegra Note

If you have not modified the configuration of your browser (Firefox or Chrome), the downloaded file should be in the Downloads folder. Open a terminal and cd into that folder. An ls inside that folder should show the target file. This image shows the listing on my system.
Oracle JRE Ubuntu 14.04

To install it, do the following:

1. Create a directory where the application will be installed: sudo makdir -p /usr/lib/jvm.

2. Unpack and install it. Be sure to replace the version of the tarball used here with the version that you downloaded: sudo tar xf jre-7u67-linux-x64.tar.gz -C /usr/lib/jvm.

3. Oracle JRE is now installed, but the system doesn’t know it yet. If you type java -version, the system will report, provided you have no other JRE installed, that no JRE is installed. You can change that by typing: sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.7.0_67/bin/java" 1

4. Set Oracle JRE as the default: sudo update-alternatives --set java /usr/lib/jvm/jre1.7.0_67/bin/java.
An easier method of setting a default JRE, especially if another JRE is installed, is to use this form: sudo update-alternatives --config java . That will bring up the options shown in this image.
Update-alternatives Java JRE

Related Post:  Run your own mail server using Mail-in-a-Box

5. After all is done, you can verify the version of JRE the system is using by typing: java -version. If it’s Oracle JRE, you will get an output of the sort shown in this image
Ubuntu OpenJDK JRE

Or this, if it’s OpenJDK JRE.
Ubuntu Oracle JRE

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Hola! Did you notice that LinuxBSDos.com no longer run network ads?  Yep, no more ads from the usual suspects that track and annoy you across the Internet. But since I still need to pay to keep the site running, feel free to make a small donation by PayPal or your favorite cryptocurrency.

  • Bitcoin
  • Ethereum
  • Xrp
  • Bitcoin cash
  • Bitcoin sv
  • Litecoin
  • Binance coin
  • Cardano
  • Ethereum classic
Scan to Donate Bitcoin to bc1qzvlte2m224zkayhdc7fdfjkp2rsgt0l5a496ua

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x0F4362DFF77F3Ba0Dc637F5f3Eba35D09a2fA60C

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Xrp to r4ggjvL36njsMCYTkJ3S7cTHscPsMsSGQv

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Bitcoin cash to qrs0dedzp9t55af3nfwypydghp29r0xguy9s20fz2k

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Bitcoin sv to 15K9TLyVDBtLuG9cYvXCX9SSkq9C9oUKHK

Donate Bitcoin sv to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin sv

Scan to Donate Litecoin to LetJ9QQMb7u2LMZ9Tu6rtHwcBcQFW98fbG

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Binance coin to bnb1ga8trq08ssqepd90v6225nzfgy448pu5pw8gxp

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Cardano to addr1qx2354yw49etstfljpdhwja3ajjlt487lg95vu9ngy2q6vu4rf2ga2tjhqknlyzmwa9mrm997h20a7stgectxsg5p5esq5l7d9

Donate Cardano to this address

Scan the QR code or copy the address below into your wallet to send some Cardano

Scan to Donate Ethereum classic to 0xcD6CC972a2297FcafACDcfE042C55C69516a9264

Donate Ethereum classic to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum classic

Subscribe for updates. Trust me, no spam!

Sponsored links

1. Attend Algorithm Conference, a top AI and ML event.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.

Upcoming events

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest

On social media
Via my newsletter

Partner links

1. Attend Algorithm Conference, a top AI and ML event for 2021.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
Hacking, pentesting distributions

Linux Distributions for Hacking

Experts use these Linux distributions for hacking, digital forensics, and pentesting.

Categories
Archives

The authors of these books are confirmed to speak during

Algorithm Conference

T-minus AI

Author was the first chairperson of AI for the U.S. Air Force.

The case for killer robots

Author is the Director of the Center for Natural and Artificial Intelligence.

Why greatness cannot be planned

Author works on AI safety as a Senior Research Scientist at Uber AI Labs.