如何在 IntelliJ IDEA 中设置 SDK?

2022-01-08 00:00:00 ubuntu-16.04 ide intellij-idea sdk java

我没有找到在 IntelliJ IDEA 中设置 SDK 的任何方法.在 ubuntu 16.04 LTS for IntelliJ IDEA 中找不到任何设置 SDK 的路径.

I am not finding any way to setup the SDK in IntelliJ IDEA. Not finding any path to setup the SDK in ubuntu 16.04 LTS for IntelliJ IDEA.

我正在这个 IDE 中工作以开发 mongodb.但由于这个问题无法继续.

I am working in this IDE for working on mongodb. But can't proceed because of this problem.

推荐答案

要在ubuntu上找到java的安装路径,可以在终端运行以下命令:

To find the path where java is installed on ubuntu, you can run the following command from terminal:

$ whereis java

你可能会得到这样的东西:

You may get something like this:

java: /usr/bin/java /etc/java /usr/share/java /usr/lib/jvm

这意味着 java 位于上述路径之一,例如 /usr/bin/java

Which means that the java resides at one of the above paths as for example /usr/bin/java

因此,该目录应该在 IntelliJ 中指定.可以在Project Structure中配置,按Ctrl + Alt + Shift + S,选择Platform Settings ->SDKs,点击绿色按钮(+),选择JDK的主目录.

So, that directory should designate in IntelliJ. You can configure in the Project Structure, press Ctrl + Alt + Shift + S, choose Platform Settings -> SDKs, click on green button (+), select the home directory for JDK.

相关文章