PyCharm freezes the entire computer on Ubuntu

I am running PyCharm 5 with JDK 8 on Ubunto 15.10. The problem is that Ubuntu comes with 3 different versions of Python, and when I am asked to choose the correct version of the interpreter in PyCharm, the whole computer just freezes. Has anyone seen something like this?

+10
source share
2 answers

To answer the question: yes, exactly the same behavior, but with OpenJDK 7 and OpenJDK 8. It freezes the user interface; the computer can be accessed, for example, via SSH so that the PyCharm Java process can be completed. I could not continue the investigation (instead, I returned to my old machine, OS X, on which PyCharm is connected to the Java interpreter).

UPDATE with workaround: change user interface theme in settings. In the Preferences dialog box under Appearance and Gain. Behavior> Appearance Change the theme from "GTK +" to "Intellij". I saved this change, restarted PyCharm, and I do not see a hang. 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

+8
source

As @Ev replied, switching to Oracle JDK so far has worked.

From: https://tecadmin.net/install-oracle-java-11-ubuntu-18-04-bionic/

Step 1 - Prerequisites Before starting the installation, run the login shell as the sudo user and update the installed packages.

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 the oracle-java11-installer package containing the Java installation script.

 sudo add-apt-repository ppa:linuxuprising/java 

Then install Java 11 using the script from this package. This script downloads the Java archive from the official site and configures it on your system.

 sudo apt update sudo apt install oracle-java11-installer 

Also, install the following package to configure Java 11 as the default Java version on your Ubuntu 18 system.

 sudo apt install oracle-java11-set-default 

Here he can give an error and give instructions for downloading jdk_something_tar.gz and mkdir and copy them there. Each step is described in a terminal error trace.

You may also need to change the command to:

 sudo apt install oracle-java11-set-default-local 

Step 3. Verify the Java version Verify the installed version of Java 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) 

therefore, adding -local to some commands is requested by tracing errors in the terminal.

Then go here: https://www.jetbrains.com/help/pycharm/switching-boot-jdk.html

Basically from the GUI help menu you can:

Switch the Java runtime used to launch PyCharm # From the Help menu, select Find Action, or press Ctrl + Shift + A.

Locate and select the Switch Boot JDK action.

Select the desired JDK and click OK.

I was freezing every 10 minutes earlier, but now all day was in order.

The JDK was packaged with Pycharm by default, I suppose.

0
source

All Articles