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. However, I noticed that IntelliJ did not auto-detect the Java installation when creating new projects. $ brew install brew install intellij-idea-ce OpenJDK 64-Bit Server VM (build 15.0.I recently went through a Homebrew (brew) Open JDK 11 and IntelliJ IDEA installation on a new Macbook Pro. OpenJDK Runtime Environment (build 15.0.2+7) You should see something like below openjdk version "15.0.2" Refer to the output message, it said openjdk is a keg-only, which means it was not symlinked into /usr/local, so we have do do this manually for us to run java command in the terminal sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk 5. If you need to have openjdk first in your PATH, run:Įcho 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' > ~/.profileįor compilers to find openjdk you may need to set:Įxport CPPFLAGS="-I/usr/local/opt/openjdk/include" Openjdk is keg-only, which means it was not symlinked into /usr/local,īecause macOS provides similar software and installing this software in Sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk => Pouring openjdk-15.0.2.big_įor the system Java wrappers to find this JDK, symlink it with This will take a few minutes brew install java Openjdk: stable 15.0.2 (bottled) ĭevelopment kit for the Java programming language Check the Java in BrewĪt the time of installing, the latest stable version is 15.0.2 $ brew info java Assuming you have installed Homebrew already, otherwise, you can go to the official website of homebrew and install it first, after that, use the following commands will help you install the latest Java (OpenJDK) in your Macġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |