Use of java (specifically on older macOS)

Gerben Wierda gerben.wierda at
Sun Dec 12 23:18:56 UTC 2021

While looking at my systems because of the log4j security issues I noticed the following:

I am running solr8 as part of my MacPorts mail server setup and it shows up like this:

$ ps laxww|grep java
  504 50615 50613   0  20  0  7594340 1316684 -      S      ??   97:31.56 /usr/bin/java -server -Xms1g -Xmx1g -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -XX:+ExplicitGCInvokesConcurrent -Xlog:gc*:file=/opt/local/var/solr/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M -Dsolr.jetty.inetaccess.includes= -Dsolr.jetty.inetaccess.excludes= -Dsolr.log.dir=/opt/local/var/solr/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Duser.timezone=UTC -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError=/opt/local/share/java/solr-8.9.0/bin/ 8983 /opt/local/var/solr/logs -Djetty.home=/opt/local/share/java/solr-8.9.0/server -Dsolr.solr.home=/opt/local/var/solr -Dsolr.install.dir=/opt/local/share/java/solr-8.9.0 -Dsolr.default.confdir=/opt/local/share/java/solr-8.9.0/server/solr/configsets/_default/conf -Xss256k -jar start.jar --module=http

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).

$ java -version
java version "12.0.2" 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

$ ls -l /usr/bin/java
lrwxr-xr-x  1 root  wheel  74 Aug 10  2019 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
-rwxr-xr-x  1 root  wheel  58336 Jul 11 07:48 /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

That java is starting to get old, the last update was the last Security Update from macOS Mojave

I also have Oracle Java SE 8 installed:

$ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)

Basically, I am rather confused about java numbering. I know I have the latest Oracle Java install and that my macOS Mojave version had its last update in the summer of 2021. I am also somewhat confused about MacPorts using the standard macOS Java which has a higher number but is an older version.

Can somebody enlighten me?

And shouldn’t ports that use java not depend on a java that comes with (old, outdated) java’s in macOS? But install and use an open source version instead? Or use the one from Oracle if available?

Gerben Wierda (LinkedIn <>)
R&A IT Strategy <> (main site)
Book: Chess and the Art of Enterprise Architecture <>
Book: Mastering ArchiMate <>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list