Dagm Fekadu
Dagm Fekadu

Reputation: 610

How to setup Pycharm and JDK on ubuntu

I am going to develop some functionality using python and I need to setup pycharm but it depends on some dependencies like open JDK of oracle. How can setup these two.

Upvotes: 0

Views: 4416

Answers (2)

pythonhunter
pythonhunter

Reputation: 1117

Please make sure you have Oracle JRE 1.6+ or OpenJDK 1.7+. To make sure of that, please check $java -version in your system terminal.

If you already have an appropriate JRE, then you’re just a couple of minutes away from finishing installation.

If not, please follow the instructions in order to install OpenJDK:

http://openjdk.java.net/install/

or Oracle JRE:

http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jre.html

The downloaded PyCharm archive name looks like:

pycharm-educational-*.tar.gz

Follow these steps:

1. Copy the pycharm-educational-*.tar.gz to the desired installation location, preferably new empty directory. Make sure you have read-write permissions for that directory.
2. Unpack pycharm-educational-*.tar.gz using the following command:
3. tar xfz pycharm-educational-*.tar.gz
4. Remove pycharm-educational-*.tar.gz to save disk space (optional)
5. Run pycharm.sh from the bin subdirectory

That’s it!

Upvotes: 1

mate00
mate00

Reputation: 2955

When you have downloaded a package from Oracle site, unpack it and copy its contents into for example /usr/lib/jvm/jdk1.8.0_51/.

Then, type following commands:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_51/bin/java" 1

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_51/bin/javac" 1

sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0_51/bin/javaws" 1

and in the end:

sudo update-alternatives --config java

and choose the the number of your Oracle Java installation.

Upvotes: 3

Related Questions