Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call into libjli.dylib instead of libjvm.dylib to fix legacy Java SE 6 popup on OSX #198

Merged
merged 1 commit into from
Oct 25, 2017

Conversation

akoeplinger
Copy link
Member

If you don't have the legacy Java6 installed then the call to JNI_CreateJavaVM() will result in a popup requesting you to install it and abort, even if you call the libjvm.dylib that's included as part of JDK8.

According to jpype-project/jpype#160 and https://bugs.openjdk.java.net/browse/JDK-7131356 this is a Java8 bug and the recommended fix is to call into libjli.dylib instead.

Indeed this fixes the issue and the popup no longer shows up.

…6 popup on OSX

If you don't have the legacy Java6 installed then the call to JNI_CreateJavaVM() will result
in a popup requesting you to install it and abort, even if you call the libjvm.dylib
that's included as part of JDK8.

According to jpype-project/jpype#160 and https://bugs.openjdk.java.net/browse/JDK-7131356
this is a Java8 bug and the recommended fix is to call into libjli.dylib instead.

Indeed this fixes the issue and the popup no longer shows up.
@jonpryor jonpryor merged commit 93f92fc into dotnet:master Oct 25, 2017
@akoeplinger akoeplinger deleted the fix-java6-popup branch October 25, 2017 23:08
Redth pushed a commit to Redth/java.interop that referenced this pull request Oct 26, 2017
dotnet#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.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants