vasileios
vasileios

Reputation: 13

ERROR: Cannot start PyCharm: No JDK found

I am using Ubuntu 18.04.5 (32-bit).

I downloaded the PyCharm tar file , I went into the bin file from my terminal and then typed

./pycharm.sh

but I had the error:

ERROR: Cannot start PyCharm: No JDK found. Please validate either PYCHARM_JDK,JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

How can this be solved ?

Upvotes: 1

Views: 4448

Answers (1)

silentDev
silentDev

Reputation: 51

Follow the steps:

  1. sudo gedit or sudo xed /usr/share/pycharm/bin/pycharm.sh

  2. find Line: JDK=`update-alternatives --list java | grep java-8 | sed 's,jre/bin/java,,' and replace it with JDK = '/usr/lib/jvm/java-8-oracle/' or JDK = '/usr/lib/jvm/java-8-openjdk-amd64/' if you're using openjdk.

  3. Save and exit

  4. Rerun PyCharm

Upvotes: 1

Related Questions