Cannot run on MacOS without a bundle

Having problems with building or using the JCEF Java binding? Ask your questions here.

Re: Cannot run on MacOS without a bundle

Postby LorenzoDV » Thu Dec 27, 2018 6:32 am

Update: I was able to make JCEF work without a bundle thanks to S1artie fixes!
More precisely, there are two things to fix:
  • making the Mach port names independent of the bundle names,
  • specifying the framework path at startup (this is somehow related to sandbox mode in OSX).

I think those fixes should be integrated in CEF/JCEF, to make it really a portable library on all platforms.

Now, I am trying to run the code in OSGi as opposed to using the regular path-based classloader. For loading the native libraries correctly on OSGi I changed the getJcefLibPath method to use the current class loader before parsing the java.library.path property. This works well: the library path is always determined correctly on all platforms.

However, I am facing another problem, only in OSX (Windows and Linux are fine).
When the Java code calls N_Initialize (a native method), the execution hangs indefinitely.
I am using the tests.detailed.MainFrame example, but called from an Eclipse command handler.
Any idea?

Thank you.
LorenzoDV
Newbie
 
Posts: 8
Joined: Sat Dec 08, 2018 4:41 pm

Re: Cannot run on MacOS without a bundle

Postby LorenzoDV » Fri Dec 28, 2018 10:33 am

LorenzoDV wrote:When the Java code calls N_Initialize (a native method), the execution hangs indefinitely.
I am using the tests.detailed.MainFrame example, but called from an Eclipse command handler.


I discovered what is causing that. The problem is that Eclipse is running SWT on the main thread, while JCEF is scheduling its work on the AWT thread, which however is running on a different thread. It looks like CEF does not like its render thread not being the main one. I'll investigate further and post another topic if necessary. Thanks.
LorenzoDV
Newbie
 
Posts: 8
Joined: Sat Dec 08, 2018 4:41 pm

Previous

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 22 guests