How to install Oracle Java 8 on Ubuntu
Please share with your friends...
  • 2
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    2
    Shares

This post is a quick how-to for installing Oracle Java 8 on Ubuntu.

The instructions in this post are supported on the following Ubuntu releases:
Ubuntu 12.04 LTS  Precise Pangolin
Ubuntu 14.04 LTS  Trusty Tahr
Ubuntu 16.04 LTS  Xenial Xerus
Ubuntu 17.10  Artful Aardvark
Ubuntu 18.04 LTS  Bionic Beaver

Java enables cross-platform application development and deployment, supporting a wide variety of platforms from embedded devices through to enterprise servers.

Oracle Java 8 will continue to receive regular updates through until at least December 2020, and is supported through until March 2025.

To install Oracle Java 8, complete the following steps:

  1. Add the WebUpd8 Java repository to the sources list, using the following command:

    sudo add-apt-repository -y ppa:webupd8team/java
    Package lists will be updated automatically.
  2. Launch the Oracle Java 8 Installer, using the following command:

    sudo apt-get install -y oracle-java8-installer
    The Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX message is displayed.

    ┌───────────────────────────────┤ Configuring oracle-java8-installer ├───────────────────────────────┐
    │                                                                                                    │
    │ Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX                  │
    │                                                                                                    │
    │                                                                                                    │
    │                                                                                                    │
    │ You MUST agree to the license available in http://java.com/license if you want to use Oracle JDK.  │
    │                                                                                                    │
    <Ok>
    │                                                                                                    │
    └────────────────────────────────────────────────────────────────────────────────────────────────────┘
  3. Select <Ok> and press Enter. The Do you accept the Oracle Binary Code license terms? prompt is displayed.

    ┌─────────────────────────────────────────────────────────┤ Configuring oracle-java8-installer ├─────────────────────────────────────────────────────────┐
    │                                                                                                                                                        │
    │ In order to install this package, you must accept the license terms, the "Oracle Binary Code License Agreement for the Java SE Platform Products and   │
    │ JavaFX ". Not accepting will cancel the installation.                                                                                                  │
    │                                                                                                                                                        │
    │ Do you accept the Oracle Binary Code license terms?                                                                                                    │
    │                                                                                                                                                        │
    │                                              <Yes>                                                 <No>
    │                                                                                                                                                        │
    └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
  4. Select <Yes> and press Enter. The download and installation process will begin.
  5. Once complete, you can confirm the installed version of Java using the following command:

    java -version
    This command produces output similar to the following:

    java version "1.8.0_171"
    Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
    Oracle Java 8 is now installed and ready for use.

Ubuntu is a trademark of Canonical Ltd. Oracle and Java™ are trademarks of the Oracle Corporation.
How to install Oracle Java 8 on Ubuntu

Please share with your friends...
  • 2
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    2
    Shares
Tagged on:                     

Leave a Reply