Importing JCEF into Gradle [SOLVED]

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

Importing JCEF into Gradle [SOLVED]

Postby jgcodes » Fri Jun 05, 2020 10:29 am

Hello JCEF community!
I've made a project using Gradle and I'm figuring out how to import JCEF into it. I built all the JARs and have the native code as well. Any suggestions as to how I can import JCEF into Gradle?

EDIT: I solved the problem by setting java.library.path in the VM args, and importing JCEF, Gluegen, and JOGL using Gradle's flatDir.
Last edited by jgcodes on Wed Jun 17, 2020 4:29 pm, edited 1 time in total.
jgcodes
Techie
 
Posts: 11
Joined: Fri Jun 05, 2020 10:16 am

Re: Importing JCEF into Gradle

Postby HarmfulBreeze » Sat Jun 06, 2020 5:43 am

Hi,
Here's how I imported the CEF JARs in Gradle (not sure it's optimal, but it works just fine). I'll assume you're using the win64 dependencies. Put this in the dependencies block:
Code: Select all
implementation name: "jogl-all"
implementation name: "gluegen-rt"
implementation name: "jcef"
implementation name: "gluegen-rt-natives-windows-amd64"
implementation name: "jogl-all-natives-windows-amd64"


And put this in the repositories block:
Code: Select all
flatDir {
    dirs 'libs'
}


Finally, put the JARs in a folder called "libs" at the root of your project, next to your "build.gradle" file, and add to the PATH the folder containing the native libs (the one with chrome_elf.dll).
HarmfulBreeze
Newbie
 
Posts: 7
Joined: Mon Feb 17, 2020 5:10 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 46 guests