java-native-access / java-native-access/jna
JNA does not support QNX
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.9k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
- Version of JNA and related jars ----> 5.12.1
- Version and vendor of the java virtual machine ----> 1.8.0_351
- Operating system ----> QNX
- System architecture (CPU type, bitness of the JVM) ----> ARM® Cortex™-A8
- Complete description of the problem
In QNX, I am trying to load a .so file built from a C/C++ project, and I get the following error at the call to the Structure class before loading the library created in JNA.
java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/qnx-aarch32/libjnidispatch.so) not found in resource path (/opt/niagara/bin/ext/annotations-13.0.jar:/opt/niagara/bin/ext/bcstd/bcpkix-jdk15on-1.70.jar:/opt/niagara/bin/ext/bcstd/bcprov-jdk15on-1.70.jar:/opt/niagara/bin/ext/bcstd/bctls-jdk15on-1.70.jar:/opt/niagara/bin/ext/bcstd/bcutil-jdk15on-1.70.jar:/opt/niagara/bin/ext/encoder-1.2.3.jar:/opt/niagara/bin/ext/hsm-2.0.3.jar:/opt/niagara/bin/ext/javax.servlet-api-3.1.0.jar:/opt/niagara/bin/ext/jetty-all-compact3-9.4.48.v20220622.jar:/opt/niagara/bin/ext/jose4j-0.7.11.jar:/opt/niagara/bin/ext/kotlin-stdlib-1.4.20.jar:/opt/niagara/bin/ext/kotlin-stdlib-common-1.4.20.jar:/opt/niagara/bin/ext/niagarad.jar:/opt/niagara/bin/ext/nre.jar:/opt/niagara/bin/ext/okhttp-3.14.9.jar:/opt/niagara/bin/ext/okio-2.10.0.jar:/opt/niagara/bin/ext/slf4j-api-1.8.0.jar:/opt/niagara/bin/ext/tridium-JavaMail-1.5.2.1.jar:/opt/niagara/bin/ext/tridium-activation-1.0.jar)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1059)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:1015)
at com.sun.jna.Native.(Native.java:221)
at com.sun.jna.Structure.setAlignType(Structure.java:291)
at com.sun.jna.Structure.(Structure.java:208)
at com.sun.jna.Structure.(Structure.java:204)
at com.sun.jna.Structure.(Structure.java:191)
at com.sun.jna.Structure.(Structure.java:183)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Native.loadNativeDispatchLibraryFromClasspath and Native.loadNativeDispatchLibrary, where the stack trace shows JNA searching for qnx-aarch32/libjnidispatch.so. Inspect how native resources are selected and packaged for platform and architecture; done means the QNX ARM Cortex-A8 runtime can load the JNA dispatch library and then the user's .so.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, java
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100