
Why does IntelliJ not accept /usr/local/opt/openjdk (installed by Brew) as a JDK?. macos - IntelliJ IDEA JDK configuration on Mac OS. This could have saved me a few extra minutes of my day. If you need to have openjdk first in your PATH, run: echo 'export PATH'/usr/local/opt/openjdk/bin:PATH'' > /.
#Mac install openjdk 11 brew install#
I guess this is just a friendly reminder for me to always read my logs. brew install openjdk11 > openjdk is keg-only, which means it was not symlinked into /usr/local, because macOS provides similar software and installing this software in parallel can cause all kinds of trouble. If you need to have first in your PATH, run:įor compilers to find you may need to set: Sudo ln -sfn is keg-only, which means it was not symlinked into /opt/homebrew,īecause this is an alternate version of another formula. Install command: brew install openjdk17 Development kit for the Java programming language License: GPL-2.0-only with Classpath-exception-2.0 Formula JSON API: /api/formula/openjdk17.json Formula code: openjdk17. => Caveatsįor the system Java wrappers to find this JDK, symlink it with In gathering up material for this post, I discovered that the solution to this just happened to be buried in the caveats that were logged during installation. With the symlink in place, IntelliJ detects the installation as expected.

$ sudo ln -s /Library/Java/JavaVirtualMachines This was a very easy fix to put in place. Selecting the Project SDK dropdown did not give me the option to use the JDK I just installed.Īfter digging around a bit, I discovered that this is because brew may not symlink the JDK installation to /Library/Java/JavaVirtualMachines. Install command: brew install openjdk Also known as: java, openjdk20 Development kit for the Java programming language License: GPL-2.0-only with Classpath-exception-2.0 Formula JSON API: /api/formula/openjdk.json Formula code: openjdk.

However, I noticed that IntelliJ did not auto-detect the Java installation when creating new projects. $ brew install brew install intellij-idea-ce I recently went through a Homebrew (brew) Open JDK 11 and IntelliJ IDEA installation on a new Macbook Pro.
