If you are installing another version, make sure you change the version number appropriately when you type the commands at the terminal. Note that, as in the preceding example, the version number is sometimes preceded with the letter To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions.If you do not have root access, install the Java in your home directory or a sub directory for which you have write permissions When you install the Java platform, the Java plugin file is included as part of that [email protected]:/Data Stax_POC# which java /usr/bin/java [email protected]:/Data Stax_POC# java -version java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java Hot Spot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) [email protected]:/Data Stax_POC# An alternative is the Zulu port of Open JDK which can be downloaded as a zip file, unpacked and used directly.If needing to run from the command line, consider prepending the bin directory to $PATH in .bash_profile.I dont know if your trying to update your whole system to the latest or just Java but you can also use "sudo apt-get upgrade" and that will upgrade all of your out of date packages on that system. My guess then is that java 1.5 is not in the repos that far back, i would suggest either ugrading your system to a later version of Ubuntu or maybe downloading the java package from the Sun website and manually installing it.
I experience similar problems, and launchpad should be the right place to get it fixed by Ubuntu.Note 2 : As you said that you get the As you did not specify whether you want to install Open JDK or Oracle JDK, my answer covers Oracle JDK. What follows applies to JDK8 too and for all Ubuntu versions of yours or higher.Oracle JDK7 itself is not hosted in the PPA because that's not allowed by the new Java license (which is also the reason why it has been removed from the official Ubuntu repositories); the package in the PPA automatically downloads Oracle Java JDK 7 from its official website and installs it on your Ubuntu / Linux Mint computer, just like the flashplugin-installer package does.See supported System Configurations for information about supported platforms, operating systems, desktop managers, and browsers.Note: For downloading Java other flavors of Linux see Java for Ubuntu, Java for Fedora The instructions below are for installing version Java 8 Update 73 (8u73).