Reputation: 33
Hi I have installed jdk 10 in ubuntu 16.0.4 using following commands.
sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java10-installer
Below link I followed to install java 10.
How to install JDK 10 under Ubuntu?
After installation I am checked with following commands.
java -version
javac -version
They are showing correct versions.
I tried the both options of installation but when I am giving JDK path form IntelliJ I am getting
"The selected directory is not a valid home for JDK" error.
When I trying out with openjdk 8, it is working fine but OpenJDK does not have jdk10. Intellij idea version - ULTIMATE 2017.2
Please help since I am stuck here for last 3 days.
Upvotes: 3
Views: 3175
Reputation: 3824
I had a similar problem a few days ago with IntelliJ after trying to configure Java 10, but I ended up reinstalling the latest build of IntelliJ and it fixed it for me.
As for why that was needed, I didn't care until I saw your question, which in turn led me to the following question: Intellij IDEA 2017.2 can't add openjk 9 on Linux Mint 18
I am using Intellij IDEA 2017.2.5 on Linux Mint 18.2 and trying to add new openjdk-9 SDK but IDEA does not accept openjdk 9 as valid JDK
And one of the comment states the following:
Looks like it's not the latest build. IDEA does not support builds earlier than b164.
Although that was the case for Java 9, I'm sure it's very likely to apply for Java 10 too.
Interestingly enough, it seems that this happened for some users back with Java 1.8 and IntelliJ 2016.x: Selected directory is not a valid home for JDK - Intellij IDEA2016 on Windows
You should probably just install the latest build of IntelliJ too, if your license doesn't cover 2018.x, you should still be able to update from 2017.2 to 2017.3
Upvotes: 0