Author Topic: Installing Java runtime on Ubuntu 14.10  (Read 1182 times)

Offline certforumz

  • Cert Exams
  • Administrator
  • Hero Member
  • *****
  • Posts: 652
  • Ask me a question ...
    • CertExams - CCNA, A+, Network+, and Others
Installing Java runtime on Ubuntu 14.10
« on: June 22, 2015, 02:21:07 AM »
Given below is the procedure for installing Java runtume on ubantu 14.1 machine:
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

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>
anandsoft@anandsoft-desktop:

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)
anandsoft@anandsoft-desktop:~$

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!

Offline certforumz

  • Cert Exams
  • Administrator
  • Hero Member
  • *****
  • Posts: 652
  • Ask me a question ...
    • CertExams - CCNA, A+, Network+, and Others
Re: Installing Java runtime on Ubuntu 14.10
« Reply #1 on: June 22, 2015, 03:08:19 AM »
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.

Example:
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!