Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot start under Java 1.7.0_101-b00: Java 1.8 or later is required. After updation to Android Studio v2.2.0 (September 2016)

I have updated android studio to 2.2.0 . It is is not going to restart again it prompt for "Cannot start under Java 1.7.0_101-b00: Java 1.8 or later is required."

I am using jdk 8 .

echo $JAVA_HOME

/usr/lib/jvm/java-8-oracle

enter image description here

like image 518
Nilesh Avatar asked Sep 21 '16 09:09

Nilesh


People also ask

Is Java 1.8 the same as Java 9?

Java 8 applications use packages as a top-level component whereas Java 9 applications use modules as a top-level component. Each Java 9 module has only one module with one module descriptor whereas Java 8 package doesn't build multiple modules into a single module.

Is Java 1.8 deprecated?

Java SE 8 has gone through the End of Public Updates process for legacy releases. Oracle will continue to provide free public updates and auto updates of Java SE 8 indefinitely for Personal, Development and other Users via java.com.


1 Answers

I had the same problem under Ubuntu system. In my case problem was solved in few steps:

  1. Delete old android-studio

  2. Install java 8

[Commands for java 8 installation]

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

[Verify installed java]

$ java -version

$ javac -version

[Command for set java 8 as default]

$ sudo apt-get install oracle-java8-set-default
  1. Remove old java versions from [root]/usr/lib/jvm location

[In my case for java 7 version]

rm -r java-7-oracle
  1. Restart your computer

  2. Install Android Studio as mentioned in https://developer.android.com/studio/install.html

like image 96
Oleg Brovko Avatar answered Sep 23 '22 00:09

Oleg Brovko