https://github.com/weisj/javanativefoundation
https://github.com/weisj/javanativefoundation
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/weisj/javanativefoundation
- Owner: weisJ
- License: bsd-3-clause
- Created: 2021-06-24T12:07:34.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-11-16T20:42:42.000Z (over 1 year ago)
- Last Synced: 2025-03-29T01:34:16.739Z (about 2 months ago)
- Language: Kotlin
- Size: 81.1 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JavaNativeFoundation
This project provides a version of the JavaNativeFoundation framework compiled both for `x86-64` and the M1 `arm64` architecture.
As there is no `arm64` definition for the JavaNativeFramework it is not possible to cross compile jni-libraries for M1 macs.
(See [this relevant thread](https://developer.apple.com/forums/thread/654601))
You can either include the framework directly or just use it as a drop in replacement for the linker during cross compilation on non arm macs.
If you only use the framwork for linking then you also need to specify the following linker options to ensure that the dynamic library is loaded
from the system framework path. Otherwise linking will fail as macOS can't find the JNF dynamic library relative to your library.
````
-rpath /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/
-rpath /System/Library/Frameworks/
````
The framework is compiled directly from the [apple openjdk](https://github.com/apple/openjdk/tree/xcodejdk14-release) port.