Use of java (specifically on older macOS)

Steven Smith steve.t.smith at
Mon Dec 13 03:02:53 UTC 2021

Java figures out which version to use from JAVA_HOME or /Library/Java/JavaVirtualMachines. Are you sure that’s not a MacPorts version?

My native macOS java binary runs the last LTS jdk from MacPorts:

> sudo -u solr /usr/bin/java -version
> openjdk version "11.0.13" 2021-10-19
> OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8)
> OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)

This is a simple path issue because `java` Is found in /usr/bin. If you want to use a MacPorts-installed binary, set up your paths appropriately. I’m not aware of any practical difference this would make.

> port provides /Library/Java/JavaVirtualMachines/openjdk11-temurin/Contents/Home/bin/java
> /Library/Java/JavaVirtualMachines/openjdk11-temurin/Contents/Home/bin/java is provided by: openjdk11-temurin

> On Dec 12, 2021, at 18:19, Gerben Wierda via macports-users <macports-users at> wrote:
> Which means that MacPorts solr8 runs using macOS native java and not one from MacPorts itself. I thought the MacPorts stuff was supposed to be fully independent (except for Xcode).

More information about the macports-users mailing list