CEF3 jcef and swt

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

CEF3 jcef and swt

Postby PA510024 » Wed Dec 10, 2014 10:23 am

Hello

I try to load the JCEF browser into an eclispe RCP SWT application (Display/shell/TabFolder/Canvas ....)/ Java 7.

I would like to have the minimum modifications to do to the jcef functional code

I saw that I can use JOGL in SWT using the SWT-AWT bridge.

I use the SefBrowserOSr class

My code like :

CefInitialize is executed in a separate thread.

Display display=new Dispaly();
Shell shell=new Shell(display);
shell.setLayout(new FillLayout();
shell.setSize(1024, 768);

I call a class constructor which inherits from swt.Canvas (the constructor calls super(shell,SWT.EMBEDDED);

I then usr Frame (java.awt.Frame)
Frame frame= SWT_AWT.new_Frame(compoiste) (composite is my swt Canvas).
fram.add(glCanvas)

here is the code

private void createGLCanvas(Composite composite) {
GLProfile glprofile = GLProfile.getMaxFixedFunc(true);
GLCapabilities glcapabilities = new GLCapabilities(glprofile);


canvas_ = new GLCanvas(glcapabilities) {
@Override
public void paint(Graphics g) {
if (parent_ != null) {
createDevTools(parent_, clientHandler_, getWindowHandle(), isTransparent_, null);
} else {
createBrowser(clientHandler_, getWindowHandle(), url_, isTransparent_, null, context_);
}
super.paint(g);
}
};

Frame frame = SWT_AWT.new_Frame(composite);
frame.add(canvas_); // c ici que ca merde

canvas_.addGLEventListener(new GLEventListener() {

..............


I get an error on frame.add(canvas)

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6e0a9829, pid=3232, tid=10088
#
# JRE version: 7.0_21-b11
# Java VM: Java HotSpot(TM) Client VM (23.21-b01 mixed mode windows-x86 )
# Problematic frame:
# V [jvm.dll+0xa9829]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\jcef_1916_1804\src\out\win32\Debug\hs_err_pid3232.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
[1210/161927:ERROR:stack_trace_win.cc(142)] SymInitialize failed: 87
[1210/161927:FATAL:context.cc(309)] Check failed: OnInitThread().
Error initializing symbols (87). Dumping unresolved backtrace:
2A424061
2A37383F
2A1B43A3
2A1B20AF
....

[error occurred during error reporting , id 0x80000003]


Did someone try this ?

thank's for your help
PA510024
Techie
 
Posts: 11
Joined: Wed Nov 13, 2013 9:53 am

Re: CEF3 jcef and swt

Postby kaiklimke » Thu Dec 11, 2014 2:46 am

I never tried SWT/eclipse, but did you had a look on issue 39:
https://code.google.com/p/javachromiumembedded/issues/detail?id=39
Maybe this is what you're searching for?
kaiklimke
Techie
 
Posts: 19
Joined: Tue Oct 29, 2013 3:49 am

Re: CEF3 jcef and swt

Postby JavaProgramer » Sat Nov 07, 2015 6:38 pm

Probably you should try https://code.google.com/p/javacef/ because it's aimed for embedding cef in SWT.
JavaProgramer
Newbie
 
Posts: 8
Joined: Sat Nov 30, 2013 10:05 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 30 guests