Shared Libraries in Java AWS Lambda Project

孤街浪徒 提交于 2019-12-13 04:25:34

问题


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

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.

来源:https://stackoverflow.com/questions/55287578/shared-libraries-in-java-aws-lambda-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!