How to Install Java on Ubuntu


java on ubuntu

Why Do I need to install? 

Java is a open source and platform independent programming language. First released by Sun Microsystems in 1995. Java used to develop programs that run on Windows, Linux and Mac computers. There are lots of software will not work unless Java installed.

What is JDK?

Java Development Kit(JDK) is used to develop java application. which is includes JRE, JVM, interpreter and compiler.

What is JRE?

Java Runtime Environment(JRE) is a set of java APIs used to develop java applications.

What is JVM?

Java Virtual Machine(JVM) is use to execute the java applications. JDK will generate byte-code(0's,1's) from our source code. JVM will execute the byte-code and show output.

Install Java 8

Step 1: Add Java Repository (PPA)
   sudo add-apt-repository ppa:webupd8team/java

java repository
Java Repository

Step 2: Update your Package

   sudo apt-get update 
Update Package
Update Package

Step 3: Install Java

   sudo apt-get install oracle-java8-installer
 if you need java 9 run following command
   sudo apt-get install oracle-java9-installer
java 8
Install Java
oracle configuration
Oracle Configuration
Configuration Confirmation
Configuration Confirmation

Step 4: Check Java Version

   java -version
Java Version
Java Version

Step 5: Set Java 8 as default 

   sudo apt-get install oracle-java8-set-default
Set default java
Set default Java
 

Comments

Post a Comment

Popular posts from this blog

HDFS Commands Part - II

HDFS Commands Part - I

Install Hadoop On Ubuntu