Zulu Community

Use of native libraries

Updated on September 13, 2016 in Zulu on Linux
1 on September 13, 2016

Hello community,

I am trying to use the nrjavaserial implementation of the RXTX serial communication library (This works with Oracle Java).
With Zulu Embedded on Raspberry Pi 2, this results in the following Exception concerning the loading of native libraries belonging to nrjavaserial:

[WARN ] [gnu.io.CommPortIdentifier           ] - Load gnu.io.RXTXCommDriver failed.


at java.lang.Class.forName0(Native Method)[:1.8.0_91-Zulu-Embedded]

at java.lang.Class.forName(Class.java:264)[:1.8.0_91-Zulu-Embedded]

at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:134)


Caused by: Unable to load deployed native resource

at gnu.io.NativeResource.loadLib(NativeResource.java:117)

at gnu.io.NativeResource.load(NativeResource.java:41)

at gnu.io.SerialManager.<init>(SerialManager.java:19)

at gnu.io.SerialManager.getInstance(SerialManager.java:25)

at gnu.io.RXTXCommDriver.<clinit>(RXTXCommDriver.java:99)

Can anyone tell me how to enable the native libraries in Zulu?

Thanks in advance

  • Liked by
0 on September 13, 2016

Hello Zulu team,

it seems that I have found the origin of the problem.
In Oracle JVM, the system property “os.arch” for Raspberry Pi is “arm”.
The Zulu JVM, however, returns “aarch32” for the same system property.
So, nrjavaserial cannot load the correct native libraries.

From my point of view, there are two possible reasons for his:
1. It is a bug. Both JVMs should rather behave in the same way.
2. There just is no “general” Zulu version for ARM. The only one is “aarch32” and this returns exactly that system property.

Can you please give more information on this and maybe a solution for my problem and similar use cases?


  • Liked by