[MacPorts] #61445: Java version not detected on macOS Big Sur 11.0.1

MacPorts noreply at macports.org
Sat Nov 28 10:39:57 UTC 2020


#61445: Java version not detected on macOS Big Sur 11.0.1
---------------------+--------------------
  Reporter:  breun   |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:          |
---------------------+--------------------

Comment (by cjones051073):

 The fix you propose changes the behaviour of the command in ways we do not
 want. It means the command will, on failure to find a matching JDK return
 the default. e.g.

 {{{
 Oberon ~/Projects/MacPorts/ports > /usr/libexec/java_home -h
 Usage: java_home [options...]
     Returns the path to a Java home directory from the current user's
 settings.

 Options:
     [-v/--version   <version>]       Filter versions (as if JAVA_VERSION
 had been set in the environment).
     [-a/--arch      <architecture>]  Filter architecture (as if JAVA_ARCH
 had been set in the environment).
     [-F/--failfast]                  Fail when filters return no JVMs, do
 not continue with default.
     [   --exec      <command> ...]   Execute the $JAVA_HOME/bin/<command>
 with the remaining arguments.
     [-X/--xml]                       Print full JVM list and additional
 data as XML plist.
     [-V/--verbose]                   Print full JVM list with
 architectures.
     [-h/--help]                      This usage information.

 Oberon ~/Projects/MacPorts/ports > /usr/libexec/java_home -v 16+
 /Library/Java/JavaVirtualMachines/openjdk15/Contents/Home
 }}}

 we do not want this, as it means an inappropriate JDK will be return on
 macOS 11.

 This is a I think clearly a bug on macOS 11, and until Apple fixes it the
 current workaround in the PG is the best option.

-- 
Ticket URL: <https://trac.macports.org/ticket/61445#comment:16>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list