I installed android-studio few days back along with openjdk. And it did work fine until yesterday. But now I cannot open it. The desktop icon is dead and when I run ./studio.sh it shows

JDK Required: Cannot load a JDK class: com.sun.jdi.Field.
Please ensure you run the IDE on JDK rather than JRE.

But openjdk is still there. I am runnning on fedora32. android-studio is in opt/ and openjdk in var/lib/

  • Output of which java, java -version?
    – Panki
    Aug 5, 2020 at 7:42
  • which java--> /usr/bin/java java -version --> openjdk version "1.8.0_265" OpenJDK Runtime Environment (build 1.8.0_265-b01) OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)
    – Rio_Nyx
    Aug 5, 2020 at 11:53
  • Open Cmd program and type echo %JAVA_HOME% and echo %JDK_HOME%. What are outputs? Jan 5, 2021 at 18:34

1 Answer 1


You have probably changed the program file location, or renamed the folder it was in. The desktop icon should be a shortcut to the studio.exe in the Android Studio program files. That's why the desktop icon is dead as it links to a non-existent file address. Check where the program files for Android Studio were installed which java. Try renaming the containing folder if possible and/or you like. Otherwise just set/create environment variable JAVA_HOME to Android Studio\jre. It should work fine

  • Welcome to the site, and thank your for your contribution. The syntax and file/path names you use imply that the solution was intended for a Windows machine - please review the answer carefully to ensure it also works on the Fedora Linux environment used by to OP.
    – AdminBee
    Jan 15, 2021 at 8:25

You must log in to answer this question.

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