I am using Linux Mint and trying to run Intellij IDEA from icon on the start menu. Starting Intellij via terminal ./idea.sh
works fine. However launching from icon (points to the same ./idea.sh
) ends up with following error:
No JDK found. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.
Running echo $JAVA_HOME
and java -version
works correctly and shows installed JDK.
How can I fix this issue and why starting from icon differs from starting from terminal?
As @lealceldeiro and @millimoose pointed out, SDKMAN exposes JAVA_HOME
every time terminal is launched. That is why JAVA_HOME
was unavailable from other places. All I had to do is add JAVA_HOME
to /etc/environment
manually:
JAVA_HOME="/home/dmkach/.sdkman/candidates/java/current"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With