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?