I found it a bit challenging to build the framework on my arm64 system.
- I had to create a symbolic link at openjdk to the apple jdk. (Not documented?)
- I had to install and select Xcode 13.4.1 to build with the minimum deployment target of 10.10.
- I had to explicitly run the build script on Rosetta:
commandLine("arch", "-x86_64", "/bin/bash", "build_jnf.sh"). Perhaps it should have worked automatically, but there may be a bug in the arch command.