JAVA-API: Manual Library Loading Support for Restricted Environments (#2253)

* feat: Added LibraryLoader that allows loading to be skipped

* feat: Changed static call to new LibraryLoader

* feat: Makefile adjustment
This commit is contained in:
Skepller
2025-05-27 23:13:39 +01:00
committed by GitHub
parent 2107afdbd4
commit 640ceb5513
20 changed files with 44 additions and 73 deletions

View File

@@ -3,13 +3,10 @@
package com.k2fsa.sherpa.onnx;
public class OfflineStream {
static {
System.loadLibrary("sherpa-onnx-jni");
}
private long ptr = 0;
public OfflineStream() {
LibraryLoader.maybeLoad();
this.ptr = 0;
}