Skip to content

Commit 93f92fc

Browse files
akoeplingerjonpryor
authored andcommitted
[Java.Runtime.Environment] Use libjli.dylib on macOS, not libjvm.dylib (#198)
If you don't have the legacy Java 6 installed on macOS, then calling `JNI_CreateJavaVM()` will result in a popup requesting you to install the legacy Java 6 VM then abort, *even if* you call the `libjvm.dylib` that's included as part of JDK8: **To open "this Java application" you need to install the legacy Java SE 6 runtime.** Click "More Info..." to visit the legacy Java SE 6 download website. [More Info...] [OK] This is due to a [Java 8 bug][jdk7131356], and a [suggested solution][jdkfix] is to instead use `libjli.dylib`. [jdk7131356]: https://bugs.openjdk.java.net/browse/JDK-7131356 [jdkfix]: jpype-project/jpype#160 Update `JdkInfo.props` so that `$(JdkJvmPath)` uses `libjli.dylib` instead of `libjvm.dylib`, removing the above warning dialog.
1 parent a2c0f27 commit 93f92fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Configuration.Override.props.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<JdkJvmPath>/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/lib/server/libjvm.dylib</JdkJvmPath>
4+
<JdkJvmPath>/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/jli/libjli.dylib</JdkJvmPath>
55
<MonoFrameworkPath>/Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.1.dylib</MonoFrameworkPath>
66
<UtilityOutputFullPath>$(MSBuildThisFileDirectory)bin\$(Configuration)\</UtilityOutputFullPath>
77
</PropertyGroup>

build-tools/scripts/jdk.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ JI_JDK_INCLUDE_PATHS = \
6464
$(_DARWIN_JDK_ROOT)/$(_DARWIN_JDK_JNI_OS_INCLUDE_DIR)
6565

6666
ifeq ($(_MONO_BITNESS),64-bit)
67-
JI_JVM_PATH = $(_DARWIN_JDK_ROOT)/Contents/Home/jre/lib/server/libjvm.dylib
67+
JI_JVM_PATH = $(_DARWIN_JDK_ROOT)/Contents/Home/jre/lib/jli/libjli.dylib
6868
endif # 64-bit
6969

7070
else # (1) failed; try Xcode.app's copy?

0 commit comments

Comments
 (0)