Date: Wed, 18 Mar 2020 13:04:49 -0700 From: Tommy Pham <tommyhp2@gmail.com> To: Jonathan Chen <jonc@chen.org.nz> Cc: Michael Osipov <1983-01-06@gmx.net>, freebsd-java@freebsd.org Subject: Re: default version Message-ID: <CANPW%2BMsZg9Wh5Shzx-_AsgzxrmJxogf1buGU3OngHDaEaOmZ5w@mail.gmail.com> In-Reply-To: <CAJuc1zOfVFF2psesRUZbO9f0QEgEEC5rF_iNDQWwpf-sY7hN9g@mail.gmail.com> References: <CANPW%2BMu0axAycYhKMX0ceH%2BaMdq28K8V3xYZprbsDMimP_xtgA@mail.gmail.com> <CAJuc1zM4Tg9bdqUaFjOjCaHojjVwzjwyAk=zvJuFy5e-sJX1_w@mail.gmail.com> <11ac9a3b-4307-b1bf-c0ed-0354d6529ab5@gmx.net> <CAJuc1zP9v50RoxdGCpOJ%2BBxBHWgxTexzQYvhUgXb72LyEkFs5Q@mail.gmail.com> <CAJuc1zOfVFF2psesRUZbO9f0QEgEEC5rF_iNDQWwpf-sY7hN9g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 18, 2020, 11:16 AM Jonathan Chen <jonc@chen.org.nz> wrote: > On Thu, 19 Mar 2020 at 07:03, Jonathan Chen <jonc@chen.org.nz> wrote: > > > > On Thu, 19 Mar 2020 at 04:55, Michael Osipov <1983-01-06@gmx.net> wrote: > > > > > > Am 2020-03-18 um 05:18 schrieb Jonathan Chen: > > > > On Wed, 18 Mar 2020 at 17:14, Tommy Pham <tommyhp2@gmail.com> wrote: > > > >> > > > >> Hello everyone, > > > >> > > > >> Is there way to specify explicitly the desired Java version to > build? This > > > >> is a list of ports that I found using Java: > > > > > > > > In /etc/make.conf, specify: > > > > JAVA_PREFERRED_PORTS= JAVA_PORT_NATIVE_OPENJDK_JDK_11 > > > > > > Where is this documented? > > > > Some notes for this should have been put into bsd.java.mk, but it's > > not. I only puzzled it out when trying to make openjdk11 my default > > Java. The relevant line is around line 201 in > > /usr/ports/Mk/bsd.java.mk. > > Incidentally, using JAVA_PREFERRED_PORTS as such will correctly use > openjdk11 only if the port allows it in its version list, eg: > USE_JAVA=8+ > or > USE_JAVA=yes > JAVA_VERSION=8+ > > If a port mandates the use of a specific version with: > USE_JAVA=8 > or > USE_JAVA=yes > JAVA_VERSION=8 > The port-system will correctly ignore JAVA_PREFERRED_PORTS and use > openjdk8 instead. > > Cheers. > -- > Jonathan Chen <jonc@chen.org.nz> > That's what my patch does as it ensures the strict requirement of the port while attempting to meet the user's request as seen in my spot check of 'make java-debug'. I think I'll submit a PR since DEFAULT_VERSIONS+=java=11 is shorter and easier to manage along with other languages. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANPW%2BMsZg9Wh5Shzx-_AsgzxrmJxogf1buGU3OngHDaEaOmZ5w>