How to setup SDK in IntelliJ IDEA?

橙三吉。 提交于 2019-12-02 01:25:55

问题


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.

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


回答1:


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

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

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.




回答2:


If you don't happen to have a JDK installed you can download the latest version here

You can unpack it to your home directory so that you don't need extra permissions:

~/Downloads$  tar zxvf jdk-<version>-linux-x64.tar.gz -C ~/java/jdk/

And finally reference your new JDK on IntelliJ:




回答3:


Alt+ Ctrl + Shift + S - Project



来源:https://stackoverflow.com/questions/43661829/how-to-setup-sdk-in-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!