java调用,LacDemo测试运行报错
- Dominant language
- C++
- Stars
- 4k
- Forks
- 592
- PR merge metrics
- No merged PRs in 30d
Description
按文档操作,最后一步运行测试的时候报错,请问是什么原因呢?

[root@localhost java]# ls
com LacDemo.class LacDemo.java liblacjni.so
[root@localhost java]# javac LacDemo.java
[root@localhost java]# java LacDemo /opt/lac/models_general/lac_model
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lacjni in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at LacDemo.(LacDemo.java:12)
[root@localhost java]#
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with java/LacDemo.java and the documented setup around liblacjni.so. Check why the JVM cannot locate the native library despite it being listed in the directory, then rerun the shown LacDemo command after the setup is corrected. Done means the example starts without UnsatisfiedLinkError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100