IntelliJ IDEA can't setup JDK

前端 未结 7 663
心在旅途
心在旅途 2020-12-23 09:07

I\'m trying to setup JDK in IntelliJ IDEA and whatever I do, or whatever JDK version I select, nothing happens. The following situation remains:

相关标签:
7条回答
  • 2020-12-23 09:47

    For someone like me, looking for a way to setup an offline documentation in IDEA on UBUNTU Linux. You should install the openjdk-8-doc (or openjdk-X-doc in general case) package, then go to File|Project Structure|SDKs|1.8(still 1.X in general), then select tab Documentation Paths and add the path /usr/lib/jvm/java-1.8.0-openjdk-amd64/docs/api there.

    Note, that path of Java docs installation may differ on your machine. You are able to check the path of Java docs installation executing dpkg-query -L openjdk-8-doc | less in a shell.

    0 讨论(0)
  • 2020-12-23 09:49

    Select your modul in the "Project View" and press F4 in the "Project Setting"select "Module". In the "Module Settings" overview you can add/remove the Modul SDK.

    0 讨论(0)
  • 2020-12-23 09:49

    In my case just File | Invalidate Caches and Restart did not work. Upon Right clicking the project and going to Module Settings , I had no SDK selected under Project Settings->Project.

    0 讨论(0)
  • 2020-12-23 09:54

    File | Invalidate Caches is the first thing you should try in case of such issues.

    0 讨论(0)
  • 2020-12-23 09:59

    I followed below steps

    1. Press F4
    2. Select Modules in Project Settings
    3. Set up Module SDK from the drop down or add the new one.
    4. Apply & OK
    0 讨论(0)
  • 2020-12-23 10:05

    Following this worked for me :

    Select your module in Project View

    Press F4

    Go to SDK

    Select you SDK

    Make sure you have various jars in there. Else, select proper directory.

    In my case, even though correct directory was selected classpath,sourcepath etc were empty.

    So I had to select jdk installation directory one more time, which loaded all the jars and solved the problem.

    0 讨论(0)
提交回复
热议问题