Configuration notice of the homebrew installed software in macOS
OpenJDK 19
After installed the openjdk19 using homebrew, it shows the following message.
Bash
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
openjdk is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides similar software and installing this software in
parallel can cause all kinds of trouble.
If you need to have openjdk first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc
For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include"
But I can access the openjdk19, maybe it's because I didn't install the jdk through macOS, so just leave it.
Bash
jun@zhaojuns-MBP ~ % java -version
openjdk version "19" 2022-09-20
OpenJDK Runtime Environment Homebrew (build 19)
OpenJDK 64-Bit Server VM Homebrew (build 19, mixed mode, sharing)
NodeJs 16
Bash
Run node@16 is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alternate version of another formula.
If you need to have node@16 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/node@16/bin:$PATH"' >> ~/.zshrc
For compilers to find node@16 you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/node@16/lib"
export CPPFLAGS="-I/opt/homebrew/opt/node@16/include"
brew link node@16
will create link for it.