I am using Robolectric library and the latest version of it v4.3.1 requires Java 9 to run. I am trying to point JRE on edit configurations but I am not finding Java 9 in the drop-down, even though I have already installed it.
Please check Java 9 installed.






You can't use Java 9, Android only supports till Java 8.
You should use the JDK version that comes with Android Studio, no need for side alone JDK. The current JDK version is based on OpenJDK 8.