openjdk: stable 18.0.1 (bottled) [keg-only]
Development kit for the Java programming language
License: GPL-2.0-only with Classpath-exception-2.0
Build: autoconf ✘
Build: Xcode ✔
Required: macOS >= 10.15 ✔
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
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.
install: 184,767 (30 days), 621,114 (90 days), 2,377,395 (365 days)
install-on-request: 48,734 (30 days), 172,952 (90 days), 673,642 (365 days)
build-error: 379 (30 days)
The information is at line 14.
So next time when a package from brew doesn’t work, give brew info a try.