1. Home
  2. Training Library
  3. Programming
  4. Programming Courses
  5. Introduction to Java and Environment Setup

Installing Java on Linux

Start course

In this course, we learn about Java technology and get you started with writing and running a Java program. 

Learning Objectives

  • What is the Java programming language?
  • Java Development Kit (JDK)
  • Java Runtime Environment (JRE)
  • Java Virtual Machine (JVM)
  • Integrated Development Environment (IDE)
  • Installation of Eclipse
  • Write a Java program
  • compile and run a Java program

Intended Audience

  • Anyone looking to get Oracle Java Certification
  • Those who want to learn the Java Programming language from scratch
  • Java developers who want to increase their knowledge
  • Beginners with no previous coding experience in Java programming
  • Those who want to learn tips and tricks in Oracle Certified Associate – Java SE 8 Programmer certification exams


  • No prior knowledge is required about the Java programming language
  • Basic computer knowledge

Installing Java SE on Linux. Hi there. In this lesson, we will install the Java Development Kit, JDK on Linux PC. If you're ready, let's move on to the JDK installation now. First, I will open the terminal. In order to install Java JDK 8, first update the package index. Write 'sudo apt-get update', type the password. Now, we will add its package repository. Write, 'Sudo add-apt-repository ppa:ts.sch.gr/ppa'. It may take some time. Press 'Enter' to continue. 

Then, update your package list. On the command line, write 'sudo apt-get update'. After package list updates, we will install Java  8. Write 'sudo apt-get install oracle-java8-installer' command on the command line. Your system will download the JDK from Oracle and ask you to accept the license agreement. Accept the agreement and the JDK will be installed. This process may take several times. Okay, the installation is complete. Now, let's look at how to select which version of Java you want to use. You can have multiple Java installations on one server. 

You can configure which version is the default for use on the command line by using the update-alternatives command. Write 'sudo update-alternatives --config java' on the command line. You can see all installed versions of Java on the result. Choose the number associated with the Java version to use it as the default or press 'Enter' to leave the current settings in place. Let's check if the JDK is set properly. Write 'java-version' command on the command line. If everything goes right, you will see the version of Java. Congratulations. Yes friends, we have completed the JDK installation. Let's take a short break here. See you in the next lesson.


About the Author
Learning Paths

OAK Academy is made up of tech experts who have been in the sector for years and years and are deeply rooted in the tech world. They specialize in critical areas like cybersecurity, coding, IT, game development, app monetization, and mobile development.

Covered Topics