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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user