Skip to content

Commit f5ce6be

Browse files
committed
#1: Fix dynamic library name for macos.
1 parent 1ca5260 commit f5ce6be

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "java-locator"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
authors = ["aston <[email protected]>"]
55
description = "Locates a Java installation in the host."
66
keywords = ["java", "jni"]

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,16 @@ fn is_unix() -> bool {
141141

142142
/// Returns the name of the jvm dynamic library:
143143
///
144-
/// * libjvm.so for Linux / Macos
144+
/// * libjvm.so for Linux
145+
///
146+
/// * libjvm.dlyb for Macos
145147
///
146148
/// * jvm.dll for Windows
147149
pub fn get_jvm_dyn_lib_file_name() -> &'static str {
148150
if is_windows() {
149151
"jvm.dll"
152+
} else if is_macos() {
153+
"libjvm.dylib"
150154
} else {
151155
"libjvm.so"
152156
}

0 commit comments

Comments
 (0)