JCEF ICU检查失败 [英] JCEF ICU Check Failed

查看:350
本文介绍了JCEF ICU检查失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎一直在碰壁,使JCEF在日蚀中运行铬。我可以找到本机函数,但仍然无法完成初始化。我设置了LD_PRELOAD变量。我同时运行MainFrame.java类和自定义Scala代码,并且在每一个中都遇到相同的问题。有解决方法吗?

I seem to be continually coming against a wall in getting chromium running with JCEF in eclipse. I was able to get to the point where the native functions are discovered but am still unable to complete initialization. I set the LD_PRELOAD variable. I am running both the MainFrame.java class and custom Scala code and run into the same problem in each. Is there a way to resolve this?

系统:


  • OS:Ubuntu 16.04

  • OS: Ubuntu 16.04

JCEF版本3

CEF版本3

Java Jdk 8

Java Jdk 8

结构和配置:

一切都在二进制分发结构下。我将jars作为库导入,将本机库路径添加到jcef jar中,并将其导入到我的项目中。

Everything is under the binary distribution structure. I imported the jars as a library, added the native library path to the jcef jar and imported it into my project.

我使用环境变量设置运行配置:

I setup the run configuration with the environment variables:


  • Display =: 0.0

  • LD_PRELOAD = /path/to/libcef.so

我所有的库和* .pak文件与chrome沙箱和助手在同一个目录和libcef.so所在的子目录(二进制分发)中。

All of my libraries and *.pak files are in the same directory and a subdirectory where the libcef.so is located (the binary distribution) as are the chrome sandbox and helpers.

代码和错误

代码在以下情况后失败:

The code fails after the following:

  println("Generating Handlers")
  CefApp.addAppHandler(Handlers.getHandlerAdapter)
  private var settings = new CefSettings
  settings.windowless_rendering_enabled = useOSR
  println("Starting App")
  private final val cefApp : CefApp = if(commandLineArgs != null && commandLineArgs.size > 0) CefApp.getInstance(ChromeCommandLineParser.parse(commandLineArgs)) else CefApp.getInstance(settings)
  println("Creating Client")
  private final val client : CefClient = cefApp.createClient()

以下输出结果:

Starting
Generating Handlers
Starting App
Creating Client
initialize on Thread[AWT-EventQueue-0,6,main] with library path /home/XXXXX/jcef/src/binary_distrib/linux64/bin/lib/linux64
[0413/135633:ERROR:icu_util.cc(157)] Invalid file descriptor to ICU data received.
[0413/135633:FATAL:content_main_runner.cc(700)] Check failed: base::i18n::InitializeICU(). 
#0 0x7ff8fa94a62e base::debug::StackTrace::StackTrace()
#1 0x7ff8fa95f88b logging::LogMessage::~LogMessage()
#2 0x7ff8fd7588d4 content::ContentMainRunnerImpl::Initialize()
#3 0x7ff8fa857962 CefContext::Initialize()
#4 0x7ff8fa85775b CefInitialize()
#5 0x7ff8fa80a9b8 cef_initialize
#6 0x7ff8d6946914 CefInitialize()
#7 0x7ff8d690200f Java_org_cef_CefApp_N_1Initialize
#8 0x7ff8de207994 <unknown>

感谢所有帮助。谢谢

推荐答案

在创建指向 icudtl的符号链接之前,我也遇到了很多问题.dat natives_blob.bin snapshot_blob.bin $ jdk / bin目录,而不是 $ jdk / jre / bin

I had a lot of problems with this too, until I created the symlinks to "icudtl.dat", "natives_blob.bin" and "snapshot_blob.bin" under the $jdk/bin directory, instead of $jdk/jre/bin.

现在我不再遇到此错误。

Now I don't get this error any more.

使用 https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding

我更改了...

$ sudo ln -s /path/to/java-cef/src/third_party/cef/linux64/Resources/icudtl.dat /usr/lib/jvm/java-8-oracle/jre/bin/icudtl.dat

$ sudo ln -s /path/to/java-cef/src/third_party/cef/linux64/Debug/natives_blob.bin /usr/lib/jvm/java-8-oracle/jre/bin/natives_blob.bin

$ sudo ln -s /path/to/java-cef/src/third_party/cef/linux64/Debug/snapshot_blob.bin /usr/lib/jvm/java-8-oracle/jre/bin/snapshot_blob.bin

到此...

$ sudo ln -s /path/to/java-cef/src/third_party/cef/linux64/Resources/icudtl.dat /usr/lib/jvm/java-8-oracle/bin/icudtl.dat

$ sudo ln -s /path/to/java-cef/src/third_party/cef/linux64/Debug/natives_blob.bin /usr/lib/jvm/java-8-oracle/bin/natives_blob.bin

$ sudo ln -s /path/to/java-cef/src/third_party/cef/linux64/Debug/snapshot_blob.bin /usr/lib/jvm/java-8-oracle/bin/snapshot_blob.bin

这篇关于JCEF ICU检查失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆