In my java class System.loadLibrary()
is not able to locate the library files. I have used Gradle build to zip file in below structure:
- zip
- mypackage
- App.class
- GatewayResponse.class
- lib
- set of jars and shared libraries
- mypackage
Lambda service is able to load my jar but not libraries.
Imagine example.jar
and libExample.so
are part of my lib directory.
From App class: I have created an object of some class in the example.jar and it works fine. when I try to load the library libExample.so
using system.loadLibrary()
, it fails.
I have used the LD_LIBRARY_PATH
property to specify the path of native libraries in AWS Lambda
It works perfectly on my local machine.