简体   繁体   English

如何在 ubuntu 上设置 Pycharm 和 JDK

[英]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.我将使用 python 开发一些功能,我需要设置 pycharm,但这取决于一些依赖项,例如 oracle 的开放 JDK。 How can setup these two.这两个怎么设置。

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/ .从 Oracle 站点下载软件包后,将其解压缩并将其内容复制到例如/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.并选择您的 Oracle Java 安装编号。

Please make sure you have Oracle JRE 1.6+ or OpenJDK 1.7+.请确保您有 Oracle JRE 1.6+ 或 OpenJDK 1.7+。 To make sure of that, please check $java -version in your system terminal.为了确保这一点,请在您的系统终端中检查 $java -version。

If you already have an appropriate JRE, then you're just a couple of minutes away from finishing installation.如果您已经有了合适的 JRE,那么您只需几分钟即可完成安装。

If not, please follow the instructions in order to install OpenJDK:如果没有,请按照说明安装 OpenJDK:

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

or Oracle JRE:或 Oracle JRE:

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

The downloaded PyCharm archive name looks like:下载的 PyCharm 存档名称如下所示:

pycharm-educational-*.tar.gz pycharm-教育-*.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!就是这样!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM