diff --git a/java/src/main/java/ai/onnxruntime/OnnxRuntime.java b/java/src/main/java/ai/onnxruntime/OnnxRuntime.java index 742805bebc0fd..c4500a6a2178d 100644 --- a/java/src/main/java/ai/onnxruntime/OnnxRuntime.java +++ b/java/src/main/java/ai/onnxruntime/OnnxRuntime.java @@ -162,13 +162,8 @@ static synchronized void init() throws IOException { // the ONNX Runtime native library will load it extractProviderLibrary(ONNXRUNTIME_LIBRARY_SHARED_NAME); - if (isAndroid()) { - // On Android, we only need to load onnxruntime4j_jni with System.loadLibrary - System.loadLibrary(ONNXRUNTIME_JNI_LIBRARY_NAME); - } else { - load(ONNXRUNTIME_LIBRARY_NAME); - load(ONNXRUNTIME_JNI_LIBRARY_NAME); - } + load(ONNXRUNTIME_LIBRARY_NAME); + load(ONNXRUNTIME_JNI_LIBRARY_NAME); ortApiHandle = initialiseAPIBase(ORT_API_VERSION_14); if (ortApiHandle == 0L) {