-
Notifications
You must be signed in to change notification settings - Fork 155
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
Can’t initialize JCEF in Mac OS Mojave with OpenJDK 11 #347
Comments
Original comment by Roman Alifanov (Bitbucket: animaonline, GitHub: animaonline). Were you able to solve your problem? |
Original comment by Anton Folumenov (Bitbucket: Anton Folumenov). I tried month ago with newer version of JCEF, but got the same result. |
Original comment by bilal.iqbal (Bitbucket: bilal.iqbal). I am facing the same issue on MacOS Mojave with JDK 8. Referenced from: */jcef_build/native/Release/libjcef.dylib Reason: image not found Did you manage to solve this issue? |
Did you apply the related PR? https://bitbucket.org/chromiumembedded/java-cef/pull-requests/53 |
@{5deceab441fd8d0e3506b92c} Does that problem reproduce with the JCEF sample apps? Note the build-related changes in 7f3a577a (bb) must also be applied to your application. |
Original comment by bilal.iqbal (Bitbucket: bilal.iqbal). @{557058:2f2a2aee-b500-4023-9734-037e9897c3ab} i git clone the code from this repository and followed the mentioned instruction for manual build on MacOS: |
Original comment by Matthew Carmona-Gonzalez (Bitbucket: Matthew Carmona-Gonzalez). Also having this issue on Mac OS 10.15.4 and openjdk version "11.0.5" 2019-10-15 using the latest commit. Attempting to run a test browser using the following arguments and adding the appropriate java.library.path.
|
Issue #385 was marked as a duplicate of this issue. |
Original report by Anton Folumenov (Bitbucket: Anton Folumenov).
My Java app which uses JCEF works fine in Windows and Linux with OpenJDK 11. Now I have to run it in Mac OS Mojave with OpenJDK 11, but I can’t do it due to the problem with JCEF initialization.
The sample app for Mac OS, created within the process of building JCEF from the sources, runs fine.
So, I guess two options:
I got several problems with code signing and with paths. There were no such problems neither in Windows or Linux, but I found solutions. But finally, my app fails to initialize JCEF at native-method CefApp#N_Initialize with the following error message:
When, app stops with the message in console:
Here is my code of JCEF initialization method:
My app fails at the last line, regardless of CefSettings parameters.
I performed following steps:
1. built JCEF in my Mac OS in /Users/username/projects/jcef as described at https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding, section “Manual Building”, step 1.
2. Added JVM parameter to startup configuration, similar to configuration in Windows and Linux:
-Djava.library.path=/Users/username/projects/jcef/jcef_build/native/Release
And got exception:
When I tried to sign libjcef.dylib with ad-hoc signature using command:
sudo codesign -f -s - /Users/username/projects/jcef/jcef_build/native/Release/libjcef.dylib
, and got another code signature error, but nothing changed at all. When I completely disabled System Integrity Protection by
csrutil disable
command in recovery mode (hold Command+R when power on and go to Utilities > Terminal) and became able to move forward.3. The next error was:
Due to unknown reason, JCEF was trying to find framework image in JDK's catalogue, instead of catalogue specified in
java.library.path
. After several attempts to solve that, I copied entire framework into JDK's catalogue, from/Users/username/projects/jcef/jcef_build/native/Release/jcef_app.app/Contents/Frameworks
to
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/Frameworks
4.And got the error about icudtl.dat (it seems to be related to the 5 years old opened issue #109/linux-mac-fix-discovery-of-icudtldat)::)
So, I copied icudtl.dat from
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/Frameworks/Chromium Embedded Framework.framework/Resources/icudtl.dat
to JDK’s directory:
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/icudtl.dat
Finally, after all actions above were performed, I started my app and it was aborted at method CefApp#N_Initialize with the message:
The text was updated successfully, but these errors were encountered: