Installing Java runtime on Ubuntu 14.10

Started by certforumz, June 22, 2015, 02:21:07 AM

Previous topic - Next topic


Given below is the procedure for installing Java runtume on ubantu 14.1 machine:

Basically, you need to run the following commands at the command prompt (Ctrl+Alt+t):
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

How you know whether java is installed or not?
After you type java -version command,  if you get a response something like the one shown below, then Java runtime is not installed.

anandsoft@anandsoft-desktop:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-7-jre-headless
* openjdk-6-jre-headless
* openjdk-8-jre-headless
Try: sudo apt-get install <selected package>

How you know whether java runtime is installed?
When you type java -version, if you get a response, something like the one shown below, then java is installed on your Ubuntu computer:

anandsoft@anandsoft-desktop:~$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) Client VM (build 24.80-b11, mixed mode)

Note: When you give the command, sudo add-apt-repository ppa:webupd8team/java, you may find some delay in the response, which might be due to the download being taken place. Wait till you get the command prompt or some screen response. If you quit, Cntrl.C, then the process will be killed.

Good luck!


Further to the above post, it is necessary to provide full path to the application. For example, when you download a linux application, it might reside int eh downloads folder of your Ubuntu computer. When you issue java -jar  <mydownloadedap>.jar it might give an error that the application was not found.

To solve this problem, you may browse to the downloaded program, and then copy the path as shown in the bar above, and paste the same. The type the filename that you want to get installed.

anandsoft@anandsoft-desktop:~$ java -jar /home/anandsoft/Downloads/buu.jar

In the above, I copied the path /home/anandsoft from the address bar in the file explorer. It worked then.

If you dont give the path, it may give error as below:
anandsoft@anandsoft-desktop:~$ java -jar buu.jar
Error: Unable to access jarfile buu.jar

Good luck!