java.lang.UnsatisfiedLinkError when using Server Gateway Java SDK

  Kiến thức lập trình

I am building a simple demo with Server Gateway Java SDK.
I am using maven that downloads the lib linux-sdk-4.0.1.jar.
Inside the jar I see the linux lib so.

    0  02-06-2023 11:59   native/
        0  02-06-2023 11:59   native/linux/
        0  02-06-2023 11:59   native/linux/x86_64/
   739728  02-06-2023 11:59   native/linux/x86_64/
 17865952  02-06-2023 11:59   native/linux/x86_64/
  3472144  02-06-2023 11:59   native/linux/x86_64/
  1556224  02-06-2023 11:59   native/linux/x86_64/

but when executing, the error happens.

java -cp target/agora-example-1.0-SNAPSHOT.jar:target/lib/linux-sdk-4.0.1.jar com.example.Main
App started
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long io.agora.rtc.AgoraService.init()'
        at io.agora.rtc.AgoraService.init(Native Method)
        at io.agora.rtc.AgoraService.<init>(
        at com.example.Main.main(

Where did I make the mistake?

I also checked the so file. It is likely not for Java JNI

1:16:35 ext_lib $ objdump -T | grep Java_

 1:16:44 ext_lib $ //nothing related to Java was output

I also try the version but it is the same.

New contributor

Dang Tuan Anh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.