Page 1 of 2

Java CEF in a Java Project on Mac OSX

PostPosted: Thu May 10, 2018 8:36 am
by joxrox
Hi JCEF Forum!

I am using Java CEF in a Windows Java project and now I have the need for a Mac OSX version. On Windows, I have a compiled binary distribution set in the Djava.library.path option and Java JAR libraries in the class-path and it has been working wonderfully.

So I borrowed a friend's Mac and compiled JCEF for Mac OSX using the latest version. I could run the example JCEF application (jcef_app.app) that gets created after making the distrobution, however, I have been unable to figure out how to implement it into my existing project. I have read here (https://stackoverflow.com/questions/26991843/how-can-i-create-java-project-using-java-chromium-embedded-framework-in-mac-os-x) that Mac OSX applications must follow a specific app bundle structure following his steps did not seem to work.

I have tried every single suggestion that I could find online, but since it has been a month since last trying and now I do not have the Mac, I can't remember exactly all the errors that I've seen. Just to name a few things I've tried:
viewtopic.php?f=6&t=13099
viewtopic.php?f=17&t=14079
https://bitbucket.org/chromiumembedded/ ... -icudtldat

So my question is, before I go and borrow his Mac again, where should my Java project's dependencies go inside the app bundle, where should the project Jar go, where should the JCEF jars go (the ones inside the Java folder in the example application), how do I tell my project where to find the required JCEF files, and how can I build this into a Netbeans project (if possible).

Sorry if this is a bit vague; as I said, it has been a month and I forgot a lot of details. If necessary, I can get the Mac back soon after finals week is over.

Thanks in advance,
Joe

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Mon May 14, 2018 7:00 am
by rmraya
Hi,

Can you make your binary build for OS X available online?

I have an app that uses JCEF on Windows and need to port it to Mac, but I have problems building the JCEF binary on latest macOS. If I get a binary for Mac, I will try to merge it with my code and -if that works- I might be able to help you use it with your project.

Regards,
Rodolfo

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Mon May 14, 2018 3:26 pm
by joxrox
Sure thing, I will try to get ahold of the files tonight.

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Mon May 14, 2018 4:10 pm
by joxrox
Here is a link to the complied sources:
https://drive.google.com/file/d/1j86GAv7_6CUrD7h1WZjxesx8ubRy8iig/view?ts=5af9f969

Hope you have some luck with it!
Joe

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Tue May 15, 2018 8:08 am
by rmraya
Hi,

Thanks for the link. Sent you an access request to download the files.

Regards,
Rodolfo

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Tue May 15, 2018 9:32 pm
by joxrox
Try this link, I didn't realize that sharing was not on:
https://drive.google.com/open?id=1j86GAv7_6CUrD7h1WZjxesx8ubRy8iig

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Fri May 18, 2018 6:27 am
by rmraya
Thanks for the files. I have them now.

Initial attempts to make the test app work failed. It crashed and I was asked to share the problem with Apple.

I'll try to run the binaries in my project. Will let you know how it goes.

Regards,
Rodolfo

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Fri May 18, 2018 12:45 pm
by joxrox
Thanks for the update, I hope you are successful!

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Mon May 21, 2018 9:34 am
by rmraya
Unfortunately, I couldn't make your JCEF build work on my Mac.

I gave up and decided to use electron.js to build the wrapper for my JavaScript app. It was easy to build and worked as expected in no time.

Thanks,
Rodolfo

Re: Java CEF in a Java Project on Mac OSX

PostPosted: Mon May 21, 2018 9:49 am
by magreenblatt
Electron is a good choice if you don't actually need any Java (or other native) code in your app.