Thursday, 15 May 2014

c# - How to enable/allow java to run in a CefSharp application -



c# - How to enable/allow java to run in a CefSharp application -

we making web browser experiment oracle's adt/forms technology. needs go web address , run java applet.

i'm using (trying to, @ least) cefsharp3 (fresh clone https://github.com/cefsharp/cefsharp).

i created wpf project this, got working (i can navigate google, here, oracle, etc) however, when navigate our java applet seem nil blank screen.

i have set browser-attributes "javadisabled", "pluginsdisabled", , "websecuritydisabled" (grasping @ straws there!) appropriately , still see blank screen.

i'm wondering if maybe app not have permissions jre? maybe jre needs included in project?

this result of debug file (after fresh run goes java applet)

[1011/121439:warning:resource_bundle.cc(280)] locale_file_path.empty() [1011/121439:warning:resource_bundle.cc(280)] locale_file_path.empty() [1011/121439:warning:resource_bundle.cc(280)] locale_file_path.empty() [1011/121439:error:renderer_main.cc(226)] running without renderer sandbox [1011/121441:warning:content_browser_client.cc(480)] no browser info matching view process id 3 , routing id 2 [1011/121441:warning:content_browser_client.cc(480)] no browser info matching view process id 3 , routing id 2 [1011/121441:warning:content_browser_client.cc(480)] no browser info matching view process id 3 , routing id 2 [1011/121441:warning:resource_bundle.cc(280)] locale_file_path.empty() [1011/121441:warning:content_browser_client.cc(480)] no browser info matching view process id 3 , routing id 2 [1011/121441:warning:content_browser_client.cc(480)] no browser info matching view process id 3 , routing id 2 [1011/121441:warning:content_browser_client.cc(480)] no browser info matching view process id 3 , routing id 2

the java applet works no problem in firefox, chrome, ie, , chromium (with winforms). wpf , java don't jive.

here's code! -- it's not much, doesn't take much utilize framework -- quite impressed.

public partial class mainwindow : window { public mainwindow() { initializecef(); initializecomponent(); setbrowsersettings(); ((iwebbrowser)webbrowser).load("url_to_java_applet"); } private void initializecef() { var settings = new cefsharp.cefsettings() { packloadingdisabled = true }; settings.ignorecertificateerrors = true; // preventing jre? cef.initialize(settings); } private void setbrowsersettings() { browsersettings settings = new browsersettings(); settings.javadisabled = false; settings.pluginsdisabled = false; settings.websecuritydisabled = true; // desperate effort allow jre run! webbrowser.browsersettings = settings; } }

looks you're right...

it wpf , java don't jive.

try winforms, not wpf prospects doesn't (note wpf run in osr mode)

see cef forum thread

update: tried http://java.com/en/download/installed8.jsp , win32 builds of cefsharp.winforms|wpf.example - both work expected jre 7.67 x86. of course of study x64 examples didn't work don't have x64 jre on pc.

c# wpf chromium-embedded cefsharp

No comments:

Post a Comment