I'm facing a big problem with JCEF on MacOS 10.12 when I try to run it from Java directly, without using the bundle generated by appbundler.
First of all, I know that CEF has some hard-coded paths that make it difficult to run without the correct directory structure.
Thanks to the comments in http://bitbucket.org/chromiumembedded/j ... -icudtldat I am already using the --framework-dir-path and other command line flags as a first step towards unbundling. I plan to eventually switch to CefSettings to set the same paths programmatically.
The problem now is that I cannot move the executable outside of the bundle. I would like to demostrate that it can run with the installed java executable, but when I try to do that Chromium fails to start and renders a blank rectangle.
Here is the log for the failing run. The only logged errors are two bootstrap_look_up: Unknown service name (1102).
- Code: Select all
Offscreen rendering disabled
Using:
JCEF Version = 3.3538.206
CEF Version = 3.3538.1852
Chromium Version = 70.0.3538.102
AppHandler.stateHasChanged: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path /Users/jenkins/Desktop/JCEF/Eclipse/workspace/MyJCEF/lib/native-libs/jcef_app.app/Contents/Java/
Added scheme search://
Added scheme client://
AppHandler.stateHasChanged: INITIALIZED
[1208/224416.677782:ERROR:mach_port_broker.mm(43)] bootstrap_look_up: Unknown service name (1102)
BrowserFrame.onAfterCreated id=1
[1208/224419.721068:ERROR:mach_port_broker.mm(43)] bootstrap_look_up: Unknown service name (1102)
BrowserFrame.windowClosing CefBrowser.close(false)
BrowserFrame.doClose id=1 CefBrowser.doClose=true
BrowserFrame.windowClosing CefBrowser.close(true)
BrowserFrame.windowClosing Frame.dispose
BrowserFrame.onBeforeClose id=1
BrowserFrame.onBeforeClose CefApp.dispose
AppHandler.stateHasChanged: SHUTTING_DOWN
shutdown on Thread[AWT-EventQueue-0,6,main]
AppHandler.stateHasChanged: TERMINATED
It only works if I use the executable in the Context/MacOS directory (JavaAppLauncher). The best I could achieve was putting a symlink to the java executable in Contents/MacOS, named exactly JavaAppLauncher. Any symlink not named like the executable mentioned in the Info.plist file of the bundle causes the above problem.
After days of research I suspect that the problem is the establishing of the IPC channel between CEF and Chromium which is somehow related to the bundle or to some kind of app sandboxing that kicks in when the executable is detected as "unbundled".
The strange thinig is that I cannot find any mention of the problem, while I see numerous reports of people running JCEF using the global java on their path. For example, the last post of http://bitbucket.org/chromiumembedded/j ... -icudtldat just 4 months old, they report a successful run via exteernal java.
I'm really stuck on this problem Any help would be very much appreciated.
Please tell me if you need more specific information.
Thanks in advance.
--
Lorenzo