OSX High Sierra Can't find JDK
已回答
I just installed IntellejIdea. Unfortunately, I can't build or run simple file because I get the error: Error:Cannot run program "/Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home/bin/java" (in directory "/Users/mark/Library/Caches/IntelliJIdea2018.1/compile-server"): error=2, No such file or directory
I checked the OS Library and the file is there.
Tearing my hair out. Please help,
Desperate
请先登录再写评论。
I redownloaded intellej and installed it. I added the plujgin downloader, and got the plugin, I confirmed that I had installed the correct JDK from Intellej. THen I created the simple template hello program and ran it. Got the same error message. I checked the project jdk and got this confirmation. No joy.
Hello,
Could you please attach screenshot from "Project Structure | SDKs"?
Thanks for the quick response, Jaroslav.
I bit more info: When I first installed it, I was able to compile and run the sample file without difficulty using the default OSX version JDK that comes from Oracle. Next day when I restarted, it didn't seem to work and I installed the JDK plugin. Maybe this was my mistake.
Thanks, Mark
Here's the .jpg
Sorry, but I asked for a screenshot from "Project Structure | SDKs"? Have you tried to delete all SDKs there and add JDK once again?
I've deleted the system SDK and reinstalled it from the Oracle site, but I haven't redownloaded the IJ one. Should I do this now?
Is this what I need to send you?
I meant this: https://www.jetbrains.com/help/idea/sdks.html?keymap=secondary_mac_os_x_10.5_
Could you please delete current JDK from the list and add new one selecting path to Oracle installation ("/Library/Java/JavaVirtualMachines")
Sa Wakas, as we say in Tagalog. Means "Finally." That worked and I'm happily coding along. I restarted the computer after downloading the JDK.
Thanks!
You are welcome!