We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5354f6 commit f07f82cCopy full SHA for f07f82c
src/lib.rs
@@ -195,6 +195,7 @@ fn do_locate_java_home() -> Result<String> {
195
// Here we should have found ourselves in a directory like /usr/lib/jvm/java-8-oracle/jre/bin/java
196
home_path.pop();
197
198
+ home_path.pop();
199
200
home_path
201
.into_os_string()
@@ -276,4 +277,10 @@ mod unit_tests {
276
277
fn locate_java_from_exec_test() {
278
println!("do_locate_java_home: {}", do_locate_java_home().unwrap());
279
}
280
+
281
+ #[test]
282
+ fn jni_headers_test() {
283
+ let java_home = do_locate_java_home().unwrap();
284
+ assert!(PathBuf::from(java_home).join("include").join("jni.h").exists());
285
+ }
286
0 commit comments