I've tried using the method found everywhere (and that I've already used) with the webupd8 PPA to install oracle-java9-installer and oracle-java9-set-default. Then, no matter what I do, when I start Android Studio I get this:

WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$AppClassLoader
WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$PlatformClassLoader

JDK Required: 'tools.jar' seems to be not in Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE. 

When I use Ubuntu Make to install Android Studio, it installs OpenJDK which would be fine but Android Studio does make a point to tell us that it will probably cause problems. So I'd rather get Oracle's JDK.

I've tried to install it on two different installs but I have the same problem.

I've tried setting JAVA_HOME to /usr/lib/jvm/java-9-oracle (because there's no jdk folder) using EXPORT or manually in the /etc/environment to no avail.

java --version returns:

java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+134)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+134, mixed mode)

javac --version returns:

javac 9-ea

Can someone help me?

Edit: I just realized I can download it from java.com, unzip it and set my JAVA_HOME to that unzipped folder. Maybe that's the only solution?

  • If you have resolved your problem, please type it up as a step-by-step answer so that others with the same issue can benefit from your experience.
    – Elder Geek
    Sep 15, 2016 at 22:59
  • No I haven't actually, I'm still trying to figure out how to set the JAVA_HOME permanently and also how to get it to work without downloading it manually from Java given all the tutorials I've found (as well as a previous install of Ubuntu I've made) seem to get it working with a PPA so there's probably something I'm doing wrong.
    – Daniel
    Sep 15, 2016 at 23:09

1 Answer 1


Java 9 is not ready to be used yet, especially for developing. Purge both oracle-java9-installer and oracle-java9-set-default and install the corresponding Java 8 packages.

The installation instructions for Linux given on this page: https://developer.android.com/studio/install.html are very clear. You do not need to use make. Just unzip the file in a folder, and run studio.sh to complete the installation.

Make sure you install the packages needed for the 64-bit architecture. You won't find lib32bz2-1.0 in the 16.04 repos though. The 16.04 package you need is called libbz2-1.0:i386 and you need to install that one.

  • Oh dear I've been tinckering with this for almost 2h. Thank you so much!
    – Daniel
    Sep 16, 2016 at 0:17
  • I've suffering some problems, like you, with Android Studio: starting it and with gradle daemon. All problems came from java version: YOU MUST USE Java 8, not Java 9 !!!
    – serfer2
    Feb 18, 2017 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .