How do I install Java for Ubuntu Server

Matty175rocks

Reputable
Nov 14, 2014
47
0
4,540
Hello
I'm currently trying to install Java 8 for a Ubuntu Server through Putty. Its a dedicated box that is rented. Any links or tutorials would be great!
Kind Regards
Matt
 
Solution
Seeing how the OP asked for version 8, what you want to do is:

(Note: $ represent prompt line)
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk
$ sudo update-alternatives --config java

The last command will list and allow you to select between java installations installed, as well as which java version you want active.
Seeing how the OP asked for version 8, what you want to do is:

(Note: $ represent prompt line)
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk
$ sudo update-alternatives --config java

The last command will list and allow you to select between java installations installed, as well as which java version you want active.
 
Solution

TRENDING THREADS