Maven JNA macOS and LD_LIBRARY_PATH
When running Java applications on a *nix
style of operating system that need to load native libraries, you will need to set the LD_LIBRARY_PATH environment variable (or something similar). That's not an issue on Linux.
macOS: I won't let you, it's for your own good
On macOS the System Integrity Protection (SIP) prevents these variables to be set in your shell (bash, zsh). It works inside Eclipse, when you define environment parameters, but not in any shell script. Unfortunately Maven's command line mvn
is a shell script.
The Notes challenge
Since the Notes client is a cross-platform product, the library locations aren't where a macOS program would look for:
- The application directory. That's where the Java runtime is at home, not the notes executable
- In a library location, here looking for
notes
instead oflibnotes.dylib
/Users/[YOURNAME]/Library/Frameworks/notes.framework/
/Library/Frameworks/notes.framework/
/System/Library/Frameworks/notes.framework/
You could try to symlink the first library: ln -s /Applications/HCL\ Notes.app/Contents/MacOS/libnotes.dylib ~/Library/Frameworks/notes.framework/notes
(after creating the rewuired directories) to run into the next challenge.
Read more
Posted by Stephan H Wissel on 12 January 2022 | Comments (0) | categories: Domino Java Maven