Instructions how to install Oracle JDK and Android will work for All Ubuntu systems(Mint and Elementary included) and Debian.
This way of installation will include Oracle JRE in JDK SE8 download.
So gonna start step by step With some pictures included.
Check to see if your Ubuntu Linux OS architecture is 32-bit or 64-bit
To do so, open up a terminal and run this line of command.
It will show if You have 32-bit or 64-bit version.
Check to see if you have Java installed on your system
This can be done by entering the following command in terminal
It might be that you already have OpenJDK installed on your system. If that’s the case, it may look like this(example)
java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea6 1.10pre) (7b15~pre1-0lucid1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
If indeed you have OpenJDK installed on your system, you will have to Uninstall it, because, this is not the version of Java installed for this post.
Completely remove the OpenJDK/JRE from your system and create a directory to hold your Oracle Java JDK/JRE binaries. This will prevent system
conflicts and confusion between different vendor versions of Java. For example, if you have the OpenJDK/JRE installed on your system, you can remove
it by typing the following at the command line:
sudo apt-get purge openjdk-\*
add webupd8team Java PPA repository in your system and install Oracle Java 8 using following set of commands
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Verify Installed Java Version and configure default environment
It sould no look something like that
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
The same ppa repository is also providing a package to set environment variables, Install this package using following command.
sudo apt-get install oracle-java8-set-default
Thatis for Oracle JDK. Now the easy part:
Install Ubuntu make
This is very useful tool to install some of the needed developer environments on Ubuntu including android studio.
If you have Ubuntu 14.04 please enter commands to, first, add the Ubuntu Make ppa:
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
Then, installing Ubunut Make:
sudo apt-get install ubuntu-make
But, if you have newer version simply installing Ubuntu Make will do.
I know the last part couldn’t be easier
install 32 bit libraries if you have 64 bit system
sudo apt-get install libc6-i386 libncurses5:i386 libstdc++6:i386
So that is it. You have the latest Oracle JDK and Android studio.