Bug 260047

Summary: java/javavmwrapper: chooses default java version depending on the local ports tree instead of DEFAULT_VERSIONS of the build
Product: Ports & Packages Reporter: Benjamin Takacs <nimaje+fbz>
Component: Individual Port(s)Assignee: Greg Lewis <glewis>
Status: Open ---    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (glewis)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Benjamin Takacs 2021-11-25 13:51:15 UTC
javavmwrapper should choose the default version of java depending on DEFAULT_VERSIONS of the build.

A locally present ports tree can have diffrent reasons, but configuration of running programs is not one of them, so javavmwrapper shouldn't use the local ports tree as configuration.

To have a way to still configure the default to something diffrent than the build the configs etc/javavm_opts.conf or etc/javavms could be extended or a new config file created.
Comment 1 Greg Lewis freebsd_committer 2021-11-25 18:55:35 UTC
javavmwrapper has existed for a long time and changing its behaviour to ignore the ports tree, if present, potentially breaks users who rely on the existing behaviour.  I won't be making a change that violates POLA and stops looking at the ports tree.

That said, it would be reasonable to propose a patch where DEFAULT_VERSIONS is looked at if environment variables like JAVA_VERSION, aren't set.