For JDK 17, the build triggers an int64 problem for platforms of different endianess when executing the file build-helper/OsArch.java and creating the C headers from the Java files.
The C files generated by the JDK are portable, so I presume they can be generated before the C compilation on another platform.