How To Install Oracle Java 13 on Ubuntu 18.04 / 16.04 & Debian 10 / 9

Windows Articles

Ubuntu Rolling Release? It is possible with Rolling Rhino

Throughout the Linux community, there are always expectations about when Ubuntu decides to have a Rolling Release. This, at least, since the...

How to recover files deleted with Windows File Recovery

Hello! Deleting files by accident is one of the biggest fears of users. Indeed, unintentionally deleting documents, music or photos can be...

How to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10?

This is a short post in which I will show you how to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10...

Linuxfx is a Windows 10 clone based on Ubuntu.

Hi! Most Windows users are afraid to switch to Linux for various reasons. However, the biggest one is the difference in the...

How to install OpenMeetings on Ubuntu 20.04 / 18.04?

If there is one thing the Internet has completely revolutionized, it is long-distance communications. And with it the business meetings that thanks to many...

Java is a popular and well-known programming language used for developing mobile, web & Desktop Applications among many other features and developments. JDK 13 is an open source available for Public in Production environments. The Java Platform lets you develop & deploy java applications on servers, desktops & IoT devices. In this article you will cover the installation of Java 13 on Ubuntu 18.04.

Install OpenJDK 13 on Ubuntu 18.04 & Debian 10/9

To download the latest version of Java , go to the official release page of JDK 13.

sudo apt install -y curl
curl -O https://download.java.net/java/GA/jdk13/5b8a42f3905b406298b72d750b6919f6/33/GPL/openjdk-13_linux-x64_bin.tar.gz

Use tar command to extract the downloaded packages.

tar xvf openjdk-13_linux-x64_bin.tar.gz

Now, move the resulting folder to /opt directory.

sudo mv jdk-13 /opt/

Configure Java Environment

sudo tee /etc/profile.d/jdk13.sh <<EOF
export JAVA_HOME=/opt/jdk-13
export PATH=$PATH:$JAVA_HOME/bin
EOF

Source the file & check java command

source /etc/profile.d/jdk13.sh

Check the installed version.

$ echo $JAVA_HOME
/opt/jdk-13
$ java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)

Installing Java SE Development Kit 13 on Ubuntu 18.04 /Debian 10/9

Java SE Development Kit contains set of tools required by Developers to write, compile, run and debug Java Applications.

Update lists & install wget

sudo apt update
sudo apt -y install wget

Now, download the Java SE Development Kit 13 by running

wget --no-check-certificate -c --header  "Cookie: oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn-pub/java/jdk/13+33/5b8a42f3905b406298b72d750b6919f6/jdk-13_linux-x64_bin.deb"

In case, curl failed or unable to download the Java SE Development Kit 13, download the package manager manually from Oracle Downloads page. Then install it using dpkg command.

sudo dpkg -i jdk-13_linux-x64_bin.deb

Remove the dependency issue if occurs by

sudo apt -f install

Configure java environment.

cat <<EOF | sudo tee /etc/profile.d/jdk13.sh
export JAVA_HOME=/usr/lib/jvm/jdk-13
export PATH=$PATH:$JAVA_HOME/bin
EOF

Check if you have installed on your machine run the given command

$ source /etc/profile.d/jdk13.sh
$ java -version
java version "13-ea" 2019-09-17
Java(TM) SE Runtime Environment (build 13-ea+33)
Java HotSpot(TM) 64-Bit Server VM (build 13-ea+33, mixed mode, sharing)

Testing Java Installation

Write a simple program which will print “HelloWorld” in Java

$ cat HelloWorld.java 
public class HelloWorld {
public static void main(String[] args) { // Prints "Hello, World" to the terminal window. System.out.println("Hello, World"); }
}

Compile java code

javac HelloWorld.java

Run the program

java HelloWorld
Hello, World

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Ubuntu Rolling Release? It is possible with Rolling Rhino

Throughout the Linux community, there are always expectations about when Ubuntu decides to have a Rolling Release. This, at least, since the...

How to recover files deleted with Windows File Recovery

Hello! Deleting files by accident is one of the biggest fears of users. Indeed, unintentionally deleting documents, music or photos can be...

How to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10?

This is a short post in which I will show you how to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10...

Linuxfx is a Windows 10 clone based on Ubuntu.

Hi! Most Windows users are afraid to switch to Linux for various reasons. However, the biggest one is the difference in the...

How to install OpenMeetings on Ubuntu 20.04 / 18.04?

If there is one thing the Internet has completely revolutionized, it is long-distance communications. And with it the business meetings that thanks to many...