#mobile #jdk #android

Installing JDK in Ubuntu for Android Studio

Installing android studio is a pain in the Ass, and installing it dependencies is a level up to that. The most complex among those is the JDK one.

Below are the steps to achieve so.

# install (open) jdk 8

sudo apt-get install -y openjdk-8-jdk

# update java compiler and set to 1.8

sudo update-alternatives --config javac

# update java runtime (optional)

sudo update-alternatives --config java

# Also set $JAVA_HOME and $PATH to your .bashrc (optional)

echo 'export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64' >> ~/.bashrc
echo 'export PATH="$PATH:$JAVA_HOME/bin' >> ~/.bashrc

# load in current bash session

source ~/.bashrc
mohammed-samgan-khan

Hi, I am Samgan, I excel at solving complex problems involving logic and step by step breakdown of the problem. Besides, to develop complex algorithms, I specialise in problem framing, systems design, and product development strategy. Sometimes I also enjoy public speaking.  

I am also the creator of penit.ink, a site which provides young writers with a free hand place to show their creation to the world. Irrespective of the niche, if you write this place is defiantly for you.