how to install JAVA 8 on Ubuntu 18.04 LTS – [BionicBeaver]

Posted by

After trying to install the OWASP ZAP tool, one of the pre-requisites that i found: JAVA 8, the latest release is [update 191] you can download it using the official web page but let’s see how to do it using CLI.

1. Installing script [OWASP ZAP] ‘ERROR’

root@valparaiso:/tmp/owasp_zap_latest/ZAP_D-2019-01-07# ./
./ line 51: [: -ge: unary operator expected
./ line 54: [: -ge: unary operator expected
Exiting: ZAP requires a minimum of Java 8 to run, found

2. Installing JAVA

root@valparaiso:# apt-get install openjdk-8-jdk
Reading package lists… Done
Building dependency tree
Reading state information… Done

After this operation, 166 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

3. Verify version

root@valparaiso:# cd /usr/bin/
root@valparaiso:/usr/bin# java -version
openjdk version “1.8.0_191”
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.18.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s