Installation on Linux

Installation of the JDK on Linux is easy and straightforward using apt-get:

  1. Update the package index of your computer. From your terminal, run:
      sudo apt-get update
  1. Check whether Java is already installed by running the following:
      java -version
  1. You'll know Java is installed if the version information for a Java install on your system is printed. If no version is currently installed, run:
      sudo apt-get install default-jdk

That's it! The JDK will be installed on your computer.

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.