Warda
Warda

Reputation: 1295

Error running: Project has no JDK configured in IntelliJ IDEA Ultimate

When I try to execute program ergo, it gives me an error.

Error running: Project has no JDK configured

Can anybody help me? I'm newbie in IntelliJ IDEA.

Upvotes: 22

Views: 58890

Answers (3)

Praveen Kumar Verma
Praveen Kumar Verma

Reputation: 3460

First, close IDE and follow this step:

1. You can delete these folders in the project structure:

.gradle
.idea
build

2. Then open IDE and reimport the project. Hopefully resolved !!

Upvotes: 5

evance masemola
evance masemola

Reputation: 21

open File -> Project Structure, under project SDK, where it says no JDK select dropdown and check if they are any JDKs available, select available JDK then click Apply then OK, your project should run now.

Upvotes: 2

learner
learner

Reputation: 826

1) Open Project Structure present under File menu or use shortcut ctrl+alt+shift+S

2) SDKs is located under Platform Settings. Select it and click the green + up the top of the window.

3) Set JDK home directory path (e.g.: /usr/lib/jvm/java-1.8.0-openjdk-amd64) and click on Apply and OK.

You should be able to execute your program now.

enter image description here

Upvotes: 27

Related Questions