When you have a problem associated with jdk in intellij, you can re-set it in Project Structure menu.
1 | File > Project Structure > Project SDK |
if it doesn’t work good although you re-set it, then remove .idea folder and re-start intellij
- remove .idea folder
- re-start intellij