Created attachment 212193 [details] Patch against /usr/ports The current version advertises: > java.vm.vendor=Oracle Corporation > java.vendor.url=http://java.oracle.com/ > java.vendor=Oracle Corporation > java.vendor.url.bug=http://bugreport.sun.com/bugreport/ But this OpenJDK distribution is not from Oracle, its it from the FreeBSD-derived AdoptOpenJDK distribution. As a comparison, this is what Azul Zulu prints: > java.vm.vendor=Azul Systems, Inc. > java.vendor.url=http://www.azulsystems.com/ > java.vendor=Azul Systems, Inc. > java.vendor.url.bug=http://www.azulsystems.com/support/ Attached is a patch which advertises that this OpenJDK distro comes from the Free BSD Project. The same can be applied to all other OpenJDK ports.
I just have noticed: > $ make java-debug | grep JAVA_PORT_VENDOR > JAVA_PORT_VENDOR= openjdk (OpenJDK BSD Porting Team) They should be consistent.
Does it matter what is advertised for the vendor? I thought as long as the JDK adheres strictly to the JSR, it should be OK. Below is what Tomcat 9.0.31 showing the JVM for Ubuntu 18.04.x LTS via the manager-gui: Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 Vendor: Ubuntu OS Name: Linux OS Version: 4.15.088-Generic.
(In reply to Tommy P from comment #2) It actually does. * For constructs like this https://sourceforge.net/p/wrapper/bugs/313/ * For assumptions about the features of a VM. E.g, SapMachine provides features other VMs don't. * Legal reasons, you can't call it Java if you are not Oracle * Marketing and support reasons
It's reasonable that we should change this. I'd like to give some thought as to what it should say though. The port is a separate group from the FreeBSD project, so I'm not sure that FreeBSD is the right choice here.
What about witht the original AdoptOpenJDK label + "(BSD port)" or similar?
A commit references this bug: Author: glewis Date: Sun Jul 12 01:03:36 UTC 2020 New revision: 542061 URL: https://svnweb.freebsd.org/changeset/ports/542061 Log: More accurate vendor information I've tweaked the values suggested in the PR patch. PR: 244634 Submitted by: Michael Osipov <michael.osipov@siemens.com> Changes: head/java/openjdk8/Makefile
A commit references this bug: Author: glewis Date: Sun Jul 12 02:13:28 UTC 2020 New revision: 542063 URL: https://svnweb.freebsd.org/changeset/ports/542063 Log: More accurate vendor information PR: 244634 Changes: head/java/openjdk11/Makefile head/java/openjdk12/Makefile head/java/openjdk13/Makefile head/java/openjdk14/Makefile
Thanks for the fix. Can you explain why you did not put AdoptOpenJDK into the name although this is a fork of it?
Because none of the AdoptOpenJDK specific code is used
(In reply to Greg Lewis from comment #9) Thanks, this is still a fork of AdoptOpenJDK, isn't it?
AdoptOpenJDK is a mirror of the official Mercurial repos. There are some AdoptOpenJDK specifics on the dev branch, which are not used at all by the BSD port. So there is is nothing AdoptOpenJDK specific in the code at all.
(In reply to Greg Lewis from comment #11) Thanks for the enlightment, I was not aware of this fact!
Is the missing space before the "(build [...]" intentional? $ java -version openjdk version "1.8.0_252" OpenJDK Runtime Environment (OpenJDK BSD Porting Team)(build 1.8.0_252-b09) OpenJDK 64-Bit Server VM (OpenJDK BSD Porting Team)(build 25.252-b09, mixed mode) This change breaks java/openjfx8-devel which checks for " (build" (including the space) in build.gradle for some reason.
(In reply to Stefan Ehmann from comment #13) I consider this to be a bug in the native launcher. The 11 launcher does not print this value at all.
HEre is Zulu example on Windows: C:\Users\osipovmi>java -version java version "1.8.0_251" Java(TM) SE Runtime Environment (build 1.8.0_251-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode) C:\Users\osipovmi>mvn -v Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00) Maven home: C:\Entwicklung\Programme\apache-maven-3.5.4\bin\.. Java version: 1.8.0_252, vendor: Azul Systems, Inc., runtime: C:\Program Files\Zulu\zulu-8\jre Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" So this value should be removed actually from the launcher and solely relied on the VM vendor property.
Here it is, the bug from less ./build/bsd-x86_64-normal-server-release/jdk/gensrc/sun/misc/Version.java: > ps.print(java_runtime_name + " " + company_name + "(build " + java_runtime_version); where > private static final String company_name = > "(OpenJDK BSD Porting Team)"; from > common/autoconf/jdk-options.m4: elif test "x$with_company_name" != x; then > ./common/autoconf/jdk-options.m4: COMPANY_NAME="$with_company_name" > ./jdk/make/gensrc/GensrcMisc.gmk:company_name = > ./jdk/make/gensrc/GensrcMisc.gmk: company_name=($(COMPANY_NAME)) > ./jdk/make/gensrc/GensrcMisc.gmk: -e 's/@@company_name@@/$(company_name)/g' \ > ./jdk/src/share/classes/sun/misc/Version.java.template: private static final String company_name = > ./jdk/src/share/classes/sun/misc/Version.java.template: "@@company_name@@"; In 11 src/java.base/share/classes/java/lang/VersionProps.java.template is used which does not have java.vm.vendor printed.
A commit references this bug: Author: glewis Date: Mon Jul 13 05:29:34 UTC 2020 New revision: 542112 URL: https://svnweb.freebsd.org/changeset/ports/542112 Log: Don't print the company name in the version info This evidently breaks some software that does parsing of -version output PR: 244634 Submitted by: Stefan Ehmann <shoesoft@gmx.net> Changes: head/java/openjdk8/Makefile head/java/openjdk8/files/patch-jdk-src-share-classes-sun-misc-Version.java.template