From b0dd79bd77a85e55ab9918e40f0aeba9c524333d Mon Sep 17 00:00:00 2001 From: Dylan Chen Date: Mon, 30 Oct 2023 14:37:50 +0800 Subject: [PATCH] support default CONNECTOR_LIBS_PATH value ./libs --- src/jni_core/src/jvm_runtime.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/jni_core/src/jvm_runtime.rs b/src/jni_core/src/jvm_runtime.rs index bd1f068b6eaee..c6ab92dfa0ef3 100644 --- a/src/jni_core/src/jvm_runtime.rs +++ b/src/jni_core/src/jvm_runtime.rs @@ -48,10 +48,8 @@ impl JavaVmWrapper { let libs_path = if let Ok(libs_path) = std::env::var("CONNECTOR_LIBS_PATH") { libs_path } else { - return Err(ErrorCode::InternalError( - "environment variable CONNECTOR_LIBS_PATH is not specified".to_string(), - ) - .into()); + tracing::warn!("environment variable CONNECTOR_LIBS_PATH is not specified, so use default path `./libs` instead"); + "./libs".into() }; let dir = Path::new(&libs_path);