#[cfg(feature = "loadjvm")] pub mod test { use jni_simple::*; use std::ptr::null_mut; #[test] fn test() { unsafe { load_jvm_from_java_home().expect("failed to load jvm"); let args: Vec = vec![]; let (vm, env) = JNI_CreateJavaVM_with_string_args(JNI_VERSION_1_8, &args).expect("failed to create java VM"); let rt = env.GetObjectRefType(null_mut()); assert_eq!(jobjectRefType::JNIInvalidRefType, rt); vm.DestroyJavaVM(); } } }