Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
488 views
in Technique[技术] by (71.8m points)

How to integrate Chromium Embedded Framework (CEF) with java

I'd like to make a desktop application to let a website be browsed, I don't want to make a browser but a Browser embeded Application. I've tried with JavaFx but I've found some problems like missing support for plugins (eg: flash, pdf viewer, etc).

After lots of search i found Chromium Embedded Framework (CEF) or JCEF Java wrapper for CEF but i don't know how to use it in java to start with.What are the dependencies?How i can start development (POC) using netbeans?

Is it possible to embed CEF/JCEF in java application?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Is it possible to embed CEF/JCEF in java application?

Yes, you can do that! The steps are:

  1. Download JCEF and extract it JCEF

  2. Declare Environment Variable to point to ${EXTRACT_DIR}/bin/lib/win64

  3. Install following files in local repository: ${EXTRACT_DIR}/bin/{gluegen-rt.jar, gluegen-rt-natives-windows-amd64.jar, jogl-all.jar, jogl-all-natives-windows-amd64.jar, jcef.jar}.

For example: mvn install:install-file -Dfile=gluegen-rt.jar -DgroupId=org.jcef -DartifactId=gluegen -Dversion=1.0 -Dpackaging=jar

  1. Create a maven project and declare installed artifacts in pom.xml

  2. Copy sample: ${EXTRACT_DIR}/bin/tests/simple/MainFrame.java to your project and try it

Take note that those steps are for Maven Project and JVM 64bit


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...