4

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.

enter image description here

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

JUAN CALVOPINA M
  • 3,695
  • 2
  • 21
  • 37
Soumen Pasari
  • 145
  • 1
  • 2
  • 11
  • I add SDKs in global settings and choose the one I want in project settings. Both are on the top menu bar. – duffymo Apr 27 '17 at 15:27
  • Refer [to help](https://www.jetbrains.com/help/idea/2017.1/working-with-sdks.html?search=jsdk#sdk_when_creating_project). If you don't have JDK installed, [get one here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). – CrazyCoder Apr 27 '17 at 15:35

3 Answers3

4

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.

JUAN CALVOPINA M
  • 3,695
  • 2
  • 21
  • 37
4

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: Project Structure SDK setup

Danilo Teodoro
  • 733
  • 5
  • 5
0

Alt+ Ctrl + Shift + S - Project

NikSa
  • 31
  • 3