Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm install complains about OpenJDK

I try to install Pycharm on Ubuntu 12.04 and I have this information:

user@user:~/Pobrane/pycharm-2.5.2/bin$ sh pycharm.sh
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)
OpenJDK Server VM (build 20.0-b12, mixed mode)
WARNING: You are launching the IDE using OpenJDK Java runtime.

         ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES!
         SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS!

NOTE:    If you have both Oracle (Sun) JDK and OpenJDK installed
         please validate either PYCHARM_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
         See http://ow.ly/6TuKQ for more info on switching default JDK.

Press Enter to continue.

What to do to work normally?

like image 406
webfanks Avatar asked Jul 13 '12 20:07

webfanks


People also ask

Does PyCharm need JDK?

As a Java application, PyCharm requires a Java runtime environment (JRE). By default, PyCharm uses JetBrains Runtime (a fork of OpenJDK), which is included with the IDE.

Why does PyCharm need Java?

Pycharm is based on the same framework as IntellJ, which is written in Java. Hence you need Java to run it.

Which Java JDK should I use?

Java SE 11 OR 17 remains the preferred production standard in 2022. While both 9 and 10 have been released, neither will be offering LTS. Since it's first release in 1996, Java has maintained a reputation for being one of the most secure, reliable, and platform independent languages for computer programming.

Can OpenJDK be used in production?

Oracle's JDK (commercial) – you can use this in development and testing for free, but if you use it in production you have to pay for it. Oracle's OpenJDK (open source) – you can use this for free in any environment, like any open source library.


1 Answers

You need to swap OpenJDK to Sun JDK.

Run this in your terminal (Ctrl + Alt + T):

sudo apt-get purge openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Follow the installation instructions and then check your Java version:

java -version

It should return something like this:

java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

To automatically set up the Java 7 environment variables, you can install the following package:

sudo apt-get install oracle-java7-set-default

Via WebUpd8

You don't even need to re-install pycharm it'll switch to the new Java version automatically.

Hope it helps.

like image 188
littlepea Avatar answered Sep 22 '22 08:09

littlepea