I am running PyCharm 5 with JDK 8 on a Ubunto 15.10. The problem is that Ubuntu comes with 3 different Python versions and when I am prompted to select the correct interpreter v
To answer the question: yes, exactly the same behaviour but with OpenJDK 7 and OpenJDK 8. It freezes the UI; the computer can be accessed eg via SSH so you can kill the PyCharm Java process. I have not been able to investigate further (instead I went back to my old machine, OS X, on which PyCharm is bundled with a Java interpreter).
EDIT with workaround: change the UI Theme in the Settings. In the Settings dialog, under Appearance & Behaviour > Appearance change Theme from 'GTK+' to 'Intellij'. I saved this change, restarted PyCharm, and I am not seeing the freeze. Bug reports on Ubuntu Launchpad and bugs.debian.org suggest problems with GTK+ and OpenJDK, for example:
https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1510009
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798131
As @Ev answered, switching to Oracle JDK has so far worked out.
From: https://tecadmin.net/install-oracle-java-11-ubuntu-18-04-bionic/
Step 1 – Prerequsities Before beginning the installation run login shell as the sudo user and update the current packages installed.
sudo apt update
sudo apt upgrade
Step 2 – Install Java 11 on Ubuntu 18.04 You need to add the following PPA to your Ubuntu system. This PPA contains a package oracle-java11-installer having the Java installation script.
sudo add-apt-repository ppa:linuxuprising/java
Then install Java 11 using the script provided in this packages. This script downloads the Java archive from the official site and configures on your system
sudo apt update
sudo apt install oracle-java11-installer
Also, install the following package to configure Java 11 as default Java version on your Ubuntu 18 system.
sudo apt install oracle-java11-set-default
Here it might throw an error and give instructions to download a jdk_something_tar.gz and mkdir
and copy it there. Every step is outlined in the terminal error trace.
Also it might ask you to change command to:
sudo apt install oracle-java11-set-default-local
Step 3 – Verify Java Version Check the installed Java version on your system using the following command.
java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
so adding -local
to some commands is requested by the error trace in the terminal.
Then go here: https://www.jetbrains.com/help/pycharm/switching-boot-jdk.html
Basicaly from the GUI help menu you can:
Switch the Java runtime used to run PyCharm # On the Help menu, click Find Action, or press Ctrl+Shift+A.
Find and select the Switch Boot JDK action.
Select the desired JDK and click OK.
I was freezing every 10 minutes before but now have been okay all day.
The default JDK was something packaged with Pycharm I believe.