Add native library to Neabeans REST project

114 Views Asked by At

I am developing a REST service that will work with ACRCloud, and for that I use the native library acrcloud_extr_tool, but when I call the service that will call ACRCloud, I have an error that appears: (java.lang.UnsatisfiedLinkError) java.lang.UnsatisfiedLinkError: no acrcloud_extr_tool in java.library.path

I am working in the NetBeans IDE 8.2 and the REST service will be deployed on a TomCat server. I found articles saying to add a link in the options for running the JVM but what I tried does not work ...

Does anyone know how to solve my problem?

Useful links:

How to add native library folder to existing project in Netbeans

giving 'java.library.path' in netbeans for .dll/.so files

1

There are 1 best solutions below

1
Gillariel On

I'm not really experienced with ACR but for what I've seen, there is a Java SDK so why not trying to use it instead of the native one? If you try it, the steps are quiet good described (Eclipse only sorry :/) in the Github Repo (https://github.com/acrcloud/acrcloud_sdk_java). Pay attention that you will need to install it on your Tomcat Server (as well as the correct version of vcredist) too in order to use it after deploying (unfortunatly I didn't find the package on Maven but maybe I'm wrong)

And maybe the easiest solution, if you don't need to many uncommon features, would be to call the webservice directly through HTTP request ? (https://www.acrcloud.com/docs/acrcloud/demos/web-api/)