, download the JDK, I downloaded the jdk-7u51-linux-i586.tar.gz
I have a JVM folder here, Direct CD Past:
$ cd/usr/lib/jvm/
Copy the downloaded jdk-7u51-linux-i586.tar.gz to the JVM folder:
$ sudo cp ~/download/JDK-7U51-LINUX-I586.TAR.GZ/USR/LIB/JVM
Extract:
$ sudo tar-zxvfjdk-7u51-linux-i586.tar.gz
Set Environment variables:
$ sudo gedit/etc/profile
Append at end of document:
Exportjava_home=/usr/lib/jvm/jdk1.7.0_51
Exportpath= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH
Exportclasspath= $CLASSPATH:.: $JAVA _home/lib: $JAVA _home/jre/lib
Modify the system default Java to:
$ sudo update-alternatives--install/usr/bin/java java/usr/lib/jvm/jdk1.7.0_51/bin/java300
$ sudo update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.7.0_51/bin/javac 300
$ sudo update-alternatives--config java
$ sudo update-alternatives--config javac
Check, enter:
$ java-version
Show:
Java Version "1.7.0_51"
Java (TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot (TM) Server VM (build 24.51-b03, Mixedmode)
----------------------------------------Gorgeous split---------------------------------------------------
2. Download Android Studio Package android-studio-bundle-133.970939-linux.tgz
Unzip:$ sudo tar zxvfandroid-studio-bundle-133.970939-linux.tgz
The folder name is Android-studio after decompression.
Move:$ sudo mv android-studio/opt/
Open folder:$ cd/opt/android-studio/bin/
Run:$ sudostudio.sh
Oh shit, the hint command doesn't exist, what's going on? Well, that's not the way to hit it, is it?
Run again:$ sudo./studio.sh
OK, it's open.
Ubuntu Android-studio