Based on a report on the mailing list. Previously: > [mosipov@mika-ion /usr/ports/java/openjdk8]$ tree /usr/local/openjdk8/include/ > /usr/local/openjdk8/include/ > ├── classfile_constants.h > ├── freebsd > │ ├── jawt_md.h > │ └── jni_md.h > ├── jawt.h > ├── jdwpTransport.h > ├── jni.h > ├── jvmti.h > └── jvmticmlr.h now > [mosipov@mika-ion /usr/ports/java/openjdk8]$ tree /usr/local/openjdk11/include/ > /usr/local/openjdk11/include/ > ├── bsd > │ ├── jawt_md.h > │ └── jni_md.h > ├── classfile_constants.h > ├── jawt.h > ├── jdwpTransport.h > ├── jni.h > ├── jvmti.h > └── jvmticmlr.h freesbd vs bsd in ports I see: > [mosipov@mika-ion /usr/ports/java/openjdk8]$ find . -name jni_md.h > ./work/openjdk/jdk/src/macosx/javavm/export/jni_md.h > ./work/openjdk/jdk/src/windows/javavm/export/jni_md.h > ./work/openjdk/jdk/src/solaris/javavm/export/jni_md.h > ./work/openjdk/hotspot/src/share/vm/prims/jni_md.h > [mosipov@mika-ion /usr/ports/java/openjdk11]$ find . -name jni_md.h > ./work/openjdk-jdk11u-jdk-11.0.2-9-2/src/java.base/unix/native/include/jni_md.h > ./work/openjdk-jdk11u-jdk-11.0.2-9-2/src/java.base/windows/native/include/jni_md.h > ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/support/modules_include/java.base/bsd/jni_md.h > ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/support/interim-image/include/bsd/jni_md.h > ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/jdk/include/bsd/jni_md.h > ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/images/jdk/include/bsd/jni_md.h It seems to be a bug, because I expect this to be platform-specific, and not generalized. This also applies to openjdk12.
Bug is fixed upstream. I expect this to be committed to the port shortly. Note that the fix needs to be forward ported to openjdk12 as well.
A commit references this bug: Author: glewis Date: Tue Mar 26 20:48:06 UTC 2019 New revision: 496923 URL: https://svnweb.freebsd.org/changeset/ports/496923 Log: Fixes for include path, jshell, and process issues. * Put MD specific include files (e.g. jni_md.h) in a subdirectory named 'freebsd' rather than 'bsd'. [1] * Remove the necessity to always have /usr/local/include in the header paths and linker paths. This allows jshell to use the system iconv.h rather than the third party one and link correctly. [2] * Fix getting process commands and arguments on FreeBSD. * Bump PORTREVISION. All fixes need forward porting to openjdk12. PR: 236754 [1], 236759 [2] Submitted by: Kurt Miller [2] Changes: head/java/openjdk11/Makefile head/java/openjdk11/files/patch-make_autoconf_flags-cflags.m4 head/java/openjdk11/files/patch-make_autoconf_lib-bundled.m4 head/java/openjdk11/files/patch-make_autoconf_lib-cups.m4 head/java/openjdk11/files/patch-make_autoconf_libraries.m4 head/java/openjdk11/files/patch-make_autoconf_platform.m4 head/java/openjdk11/files/patch-make_autoconf_spec.gmk.in head/java/openjdk11/files/patch-make_autoconf_toolchain.m4 head/java/openjdk11/files/patch-make_lib_Awt2dLibraries.gmk head/java/openjdk11/files/patch-src_hotspot_os_bsd_os__bsd.cpp head/java/openjdk11/files/patch-src_java.base_bsd_native_libjava_ProcessHandleImpl__bsd.c
Testing the updates right now...
Works like a charm now with HawtJNI and Jansi for FreeBSD.