find css that isn't used | how to get server date time in php? | vk
 


 

How To Setup Java on Ubuntu 16.04


How To Setup Java on Ubuntu 16.04

Image source: Pixabay free images



Java is a general-purpose computer programming language which is used from many software applications or websites.

Java is available from the Open Source project OpenJDK and freely available from Oracle.

Some Java applications require Oracle Java. This is my case. Here I describe the available solutions.

Install OpenJDK

Use the following command to install OpenJDK

sudo apt-get install default-jre

Install Oracle Java

You can install Oracle Java

  1. using PPA repository
  2. with direct download

Personally, I prefer the second method.

Using PPA repository

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

then

sudo apt-get install oracle-java8-installer

Direct download

Go to Oracle Downloads at section "Java Platform, Standard Edition" and click the current Java version. Download the JDK from the available options. In this example jdk-8u92-linux-x64.tar.gz (JDK 8u92 for Linux x64).

Move the dowwnloaded file to /opt. Then:

cd /opt
tar xvzf jdk-8u92-linux-x64.tar.gz

Then

sudo nano /etc/environment

add

JAVA_HOME=/opt/jdk1.8.0_102

then

source /etc/environment

Test your environment with the following command:

echo $JAVA_HOME

Related Posts

You may also be interested in

Εγγραφή!
Sign-up for our free email newsletter. Get updates when new tutorials and tips are published. You can unsubscribe anytime with a click.

Your comments are welcomed!

This site actively encourages commenting on any post. Comments are not pre-moderated, but this community does not tolerate direct or indirect attacks, name-calling or insults. Please, read terms of use and Comment Policy at privacy policy.

How To Setup Samba on Ubuntu Workstation How To Setup And Configure Mozilla Firefox on Ubuntu 16.04