Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA - "Imported project refers to unknown jdks JavaSE-1.8" while import Eclipse projects

I tried to import Eclipse project to IntelliJ IDEA, but I got this error:

enter image description here

like image 873
Zwedgy Avatar asked Jun 06 '17 12:06

Zwedgy


2 Answers

The eclipse project description contains a reference to a "manually" defined JDK (named JavaSE-1.8).

Just go forward and define an SDK for your project within IntelliJ yourself. See here for the necessary steps:

To define a JDK and a mobile SDK in IntelliJ IDEA

Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).

In the leftmost pane, under Platform Settings, click SDKs.

Above the pane to the right, click  and select JDK.

In the dialog that opens, select the installation directory of the JDK to be used and click OK.

... (obviously you don't need the Java ME mobile specific things listed in the original link)

like image 180
GhostCat Avatar answered Sep 22 '22 19:09

GhostCat


Here they had a similar problem, but with android sdk

You must edit Project SDK in Project Structures > Dependencies to existing Java JDK

like image 29
Szymon Avatar answered Sep 23 '22 19:09

Szymon