-
Notifications
You must be signed in to change notification settings - Fork 179
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
[Mac OS X] To open "this Java application" you need to install the legacy Java SE 6 runtime. #160
Comments
I do not think that we can handle this issue on our side. If there would exist a functional workaround, I'd be happy to accept it. |
Hi, all. I think I am little lost. I didn't get it how @e9t managed to work around the issue. jpype currently tries to find libjvm.so what it would not happen in mac os X as is. I created symbolic link libjvm.so pointing to libjvm.dylib. However, the native library (_jpype.cpython-35m-darwin.so) |
hi @rdllopes, you can just start your jvm with |
If the LinuxJVMFinder is used then sys.platform does not evaluate to "darwin" anymore?! |
that is indeed is suspicious that he said it was searching for libjvm.so. but even the DarwinJVMFinder does not work for the jvms i tried. one would have to change https://github.com/originell/jpype/blob/master/jpype/_darwin.py#L35 to |
Okay, I will just change it. |
…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.
#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.
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.
This is a workaround for the legacy Java SE6 popup on MacOS. 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.
Platform: OSX Catalina
Problem:
Let's check that folder.
Hmm. Folder not there. Where could this dynamic library be?
Ah. Folder naming is slightly different from what Solution:
Everything works and we are all happy:
That is all. |
If you have a fix to the JVMFinder to locate the correct shared library it would be great. Unfortunately I don't have access to a Mac. |
Hey @Thrameos there are some warnings - they don't block anything so no worries.
Don't think this is Mac issue. Maybe from me using using latest Java? Whoops - this is for GanttProject and I was just pasting away merrily. I'll open it there :) |
I have seen that on a number of projects including maven. I believe this this is an issue with the jar org.ganttproject.impex.htmlpdf. I don't believe it is related to JPype directly. I think that some libraries are using reflection to access a private field which is now being deprecated. We do not currently make access to DirectBuffer.cleaner. |
Some users of KoNLPy reported that upon invoking JPype on a Mac, we get the following error message:
and Python crashes with the following popup:
I found that the same issue was reported for rJava, and they say this is an official Java 1.8 bug.
There seem to be two ways to work around this problem:
[discussion]
libjli.dylib
instead oflibjvm.dylib
[example]
libjvm.dylib
: '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/server/libjvm.dylib'libjli.dylib:
'/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jli/libjli.dylib'I've tried the latter option for KoNLPy and the crashing went away, but my pre-existing code returned errors like the following:
The text was updated successfully, but these errors were encountered: