I am working on a project (web app) using Play2 lib (com.google.code.play2-maven-plugin) version : 1.0.0-rc5
When I want to run it on a Mac M1 machine (Darwin Kernel Version 23.2.0: root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 x86_64)
It shows this issue :
After running: mvn clean install and mvn play2:run
java.lang.UnsatisfiedLinkError: /Users/xxxx/Desktop/my-project/target/native_libraries/libjnotify.jnilib: dlopen(/Users/xxxx/Desktop/my-project/target/native_libraries/libjnotify.jnilib, 0x0001): tried: '/Users/xxxx/my-project/target/native_libraries/libjnotify.jnilib' (fat file, but missing compatible architecture (have 'unknown,unknown,i386,x86_64', need 'arm64'))
I checked this folder : /Users/xxxx/my-project/target/native_libraries, and it contains the libjnotify.jnilib file
Any ideas how can I make it compatible with my machine arch ?
JNotify is a library that enables directory monitoring for Java. I created it at 2005. With JDK 1.7 released at 2014, Java added native support for this functionality. JNotify supports Windows, Linux, Intel Mac and FreeBSD, however no M1 is not a supported platform.
There haven't been any work done on JNotify since a contributor added FreeBSD support (last update was at 2013).
At this point, my recommendation was to switch to native JDK support as an alternative to using JNotify.
However, building for M2 mac shouldn't be too difficult though (it might just work). If you want to do the work of enabling M1 support in JNotify and release a new version I will try to help.