Installed intellij and added sdk path to project structure, but when i try to run i get:
Error: Cannot run program "/home/$USER/java/jdk1.8.0_121/bin/java" (in directory"/home/$USER/.intelliJIdea2016.3/system/compile-server"): error=2, No such file or directory
Both files (/home/$USER/java/jdk1.8.0_121/bin/java and /home/$USER/.intelliJIdea2016.3/system/compile-server) exists.
I am using Ubuntu 16.10
The answer from here Change jdk path in IntelliJ 13 when compiling from 32 bit program file folder to 64 bit one worked for me
From the menu: File
-> Project Structure...
.
On the left, below "Platform Settings", you have "SDKs": click on it; you can add your new JDK here.
Always in the same window, below "Project Settings", select "Project": you have the option to select the JDK which you just added.
In my case, IntelliJ was pointing to a JDK folder of a version I had uninstalled. For some reason the uninstaller didnt remove the Java/jdk* folder, so it was not showing any error in the configuration screen File -> Project Structure -> SDK
After finding out it was pointing to an uninstalled JDK folder then I proceeded to adjust this configuration thanks to the answer posted by UberHans
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