Updating OpenJDK (Ubuntu)

Discussion in 'General Linux Discussion' started by booman, Sep 23, 2015.

  1. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,339
    Likes Received:
    624
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    If you are running an older version of Ubuntu such as Ubuntu 12.04
    Some Java games refuse to work on the old versions of Java
    You can install OpenJDK 8 from a PPA repository

    Follow these steps to update OpenJDK:

    Open Terminal
    Ctrl+Alt+T

    Add PPA
    Type:
    Code:
    sudo add-apt-repository ppa:openjdk-r/ppa
    Press Enter
    Enter password

    Update
    Type:
    Code:
    sudo apt-get update
    Press Enter

    Install OpenJDK 8
    Type:
    Code:
    sudo apt-get install openjdk-8-jdk
    Press Enter

    Set Default Java
    Type:
    Code:
    sudo update-alternatives --config java[code]
    Press Enter
    Note:  Type in a number to select a Java version
    
    Set default compiler
    Type:
    [code]sudo update-alternatives --config javac
    Press Enter

    Verify installation
    Type:
    Code:
    java -version
    Press Enter

    Output should look like this:
    Code:
    openjdk version "1.8.0_01-internal"
    OpenJDK Runtime Environment (build 1.8.0_01-internal-b04)
    OpenJDK 64-Bit Server VM (build 25.40-b08, mixed mode)

Share This Page