Introduction
This page is based on experience of setting up Java 8 on Ubuntu 14.04. Much of it may be applicable to other Java versions and distros.
Architecture
First we check which architecture we are running on.
Open a terminal and type the command :
arch
The output could be i686 or i386 for a 32 bits system or x86_64 for a 64 bits system.