- Download JDK 9 from http://www.oracle.com/technetwork/java/javase/downloads/index.html. Current version when this note created is JDK 9.0.1.
- Follow installation instruction.
- In window system environment, set JAVA_HOME to JDK 9
for example: JAVA_HOME = JAVA_HOME=C:\Java\jdk-9.0.1\ - In window system environment, set to path to JDK 9 binary folder
for example Path=...;C:\Java\jdk-9.0.1\bin;...
- Add Backport repository to /etc/apt/sources.list
# BACKPORT
deb http://ftp.de.debian.org/debian stretch-backports main - Install JDK 9 straight forward
# apt-get install openjdk-9-jdk openjdk-9-jdk-headless openjdk-9-jre openjdk-9-jre-headless
- You can remove your JDK 8
- Android Studio 3 and earlier does not work with JDK 9. You may used JDK 8 that bundled in Android Studio 3 (tested on Android Studio 3 in Windows 10).
- "Package Explorer" right click -> Properties
- "Java Build Path" -> Library (tab)
- Remove JRE System Library [JavaSE-1.8]
- Click "Add Library" botton
- "Add JRE System Library" -> Next -> "Workspace default JRE (jre-9.0.1)" -> Finish
- Click Apply botton
- Click Apply and Close botton
Reference:
- http://wiki.eclipse.org/Configure_Eclipse_for_Java_9