You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu16.04下JDK10安装正常但IntelliJ路径选择报错求助

Troubleshooting IntelliJ's "Not a valid JDK 10 home" Error on Ubuntu 16.04

Hey there, let's work through this issue step by step—command line recognizing your JDK but IntelliJ not picking it up is a common hiccup, but easy to fix.

Step 1: Confirm your JDK 10's actual installation path

First, let's make sure you're pointing IntelliJ to the right directory. Run this command in your terminal to get the exact root path of your Oracle JDK 10:

update-alternatives --list java

You should see something like /usr/lib/jvm/java-10-oracle/bin/java—the JDK home directory is the parent of the bin folder here, so that would be /usr/lib/jvm/java-10-oracle/.

Step 2: Double-check your IntelliJ selection

When adding the JDK in IntelliJ, it's easy to accidentally select the bin subfolder or another child directory instead of the root JDK folder. Make sure you navigate to the full path we found above (e.g., /usr/lib/jvm/java-10-oracle/) and select that root directory, not any of its subfolders.

Step 3: Manually add the JDK to IntelliJ's SDK list

If selecting the directory directly still doesn't work, try manually registering it:

  • Open IntelliJ and go to File > Project Structure (or press Ctrl+Alt+Shift+S).
  • Under Platform Settings, select SDKs.
  • Click the + icon in the top-left corner and choose JDK.
  • Navigate to the confirmed JDK root path (/usr/lib/jvm/java-10-oracle/) and select it. IntelliJ should now recognize it as a valid JDK 10 home.

Step 4: Verify IDE compatibility

JDK 10 is an older release, so make sure your version of IntelliJ IDEA supports it. IntelliJ IDEA 2018.1 and later versions officially support JDK 10. If you're using an older IDE build, you'll need to upgrade IntelliJ to a version that works with JDK 10.

Step 5: Check directory permissions (if needed)

In rare cases, IntelliJ might lack read access to the JDK directory. If all the above steps fail, run this command to ensure proper permissions:

sudo chmod -R 755 /usr/lib/jvm/java-10-oracle/

Then restart IntelliJ and try selecting the directory again.

内容的提问来源于stack exchange,提问作者mishi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:27:22