No JDK specified for module ERROR MESSAGE

Answered

Im new with using intellij and I installed it and I'm trying to run a java project but when I select run I get the following error: Error running build DBViews: No jdk for module "insert name". And idea on how to fix this? I have jdk installed. I've looked through the support documents to find an answer but the steps that they tell me to do aren't available for ex. I cannot create a "new" jdk. Thanks!

2
16 comments
Avatar
Permanently deleted user

Hi,
you need to set the JDK for your project and/or modules.

Open the project settings (File->Project settings...).

Most of the time you just need to set the project sdk (to your java sdk) and configure the modules to use the project sdk.
Probably one of those settings is missing.

Regards,
Wallaby

1
Avatar
Permanently deleted user

Still don't have that option. I heard something about pointing it to the jdk? how would u do that??



Attachment(s):
no jdk.jpg
0
Avatar
Permanently deleted user

Hello,

Take a look at my post in the following thread where I laid out detailed steps on how to confgure the JDK in a project. See if that helps. Seeing all the red gutter marks in your screenshot leads me to beleive you your JDK is not configured correctly.

http://devnet.jetbrains.net/message/5261815#5261815

-Mark

-1
Avatar
Permanently deleted user

Sadly, Mark Vedder's link has broken (404).

On my machine, I found out where the JDK was by typing `which java` at the console.

0
Avatar
Permanently deleted user

Great support, right on time....

0
Avatar
Permanently deleted user

Was stuck for so long because of this issue. Thank you for your help J. Ansorg

0

There is no "Project settings..." under "File" anymore, could you update this answer?

0
Avatar
Liubov Melnikova

You can open File | Settings instead (Ctrl+Alt+S).

0
Avatar
Permanently deleted user

Restart intelliJ and import project as maven if it is a maven project.

2
Avatar
Permanently deleted user


To Add JDK to your Project
.
Go to File > Project Settings > Modules > Module SDK: (Drop Down to select the JDK of choice)


0
Avatar
Permanently deleted user

Sai Amit Ahuja's suggestion worked for me. I had JDK set in Project Settings, but because I hadn't imported as Maven project the Run Configuration was still listing this error.

 

Edit: Just kidding. When I clicked on it the run config drop down the error icon reappeared. This solved it for me: Preferences > Build, Execution, Deployment > Build Tools > Maven. Make sure that "JDK for importer" is set to the same JDK you're using in Run Configuration's "JRE" selection.

0

This fixed the issue for me.
>> Restart the IDE and Reload the Maven Project

0

Hi. Are you still alive ? :) ❤️

-1

Hi,

As far as I have seen, the menu structure has changed. For version 2021.2.3, the path is File > Project Structure > Project Project SDK

 

3

This fixed the issue for me too.
>> Restart the IDE and Reload the Maven Project

0

Fixed the problem for me. Thank you so much. Your way of telling the answer stood out among all. Everyone should learn from you.

0

Please sign in to leave a comment.