0

This problem has arisen while working with the Java Chromium Embedded Framework (JCEF).

The JCEF uses a native SO library (libcef.so) and a SO library for the JNI bindings (libjcef.so). I believe the embedded Chromium looks for a file named icudtl.dat next to it, i.e. in the same directory that the libraries reside.

For the following explanation, asume that all those required files are in the same directory, named jcef_libs.

I wrote a test application using JCEF. After compiling, if I execute it with the java command, i.e.

$ export LD_LIBRARY_PATH=/path/to/jcef_libs 
$ java -cp src/main/java:/path/to/maven/repo/jcef.jar:/path/to/maven/repo/jogl-all/2.2.4/*:/path/to/maven/repo/gluegen-rt/2.2.4/* tests.simple.MainFrame

it works flawlessly.

On the other hand, using the exec-maven-plugin raises a fatal error, due to not finding the named icudtl.dat file. The POM file is configured to use exactly the same artifacts as the java command does.

$ mvn exec:java -Dexec.mainClass="tests.simple.MainFrame"
[1201/123038:FATAL:content_main_runner.cc(721)] Check failed: base::i18n::InitializeICU().

I have tested the java command with the icudtl.dat file removed from the jcef_libs directory, experiencing the same error, i.e. the error raises only when the icudtl.dat is not found.

Any help will be appreciated.

UPDATE

I have been tracing what maven does under the hood. The failing mvn command above executes this internally:

java -classpath /usr/share/maven2/boot/classworlds.jar -Dclassworlds.conf=/usr/share/maven2/bin/m2.conf -Dmaven.home=/usr/share/maven2 org.codehaus.classworlds.Launcher "exec:java" "-Dexec.mainClass=tests.simple.MainFrame"

I.e. it executes my test application through a launcher. I don't know where this launcher is going to execute my application but, again, I need the icudtl.dat in that directory.

Any idea how could I workaround this?

4
  • You can't use JOGL without GlueGen and JOGL 2.2.4 is obsolete, please switch to JOGL 2.3.2. We only maintain the very latest version.
    – gouessej
    Commented Dec 1, 2015 at 13:10
  • @gouessej Thank you for your comment. GlueGen is there, check the sample code, it works with the java command. I have changed my POM to use 2.3.2 but it won't fix my problem.
    – clapas
    Commented Dec 1, 2015 at 13:15
  • You comment /path/to/maven/repo/gluegen-rt in your command. You probably don't use JOGL at all.
    – gouessej
    Commented Dec 1, 2015 at 13:33
  • @gouessej It is a path wildcard, not a comment. I suppose theway the code snippet looks is confusing you... Again, the JCEF works when executed with the java command. No way the JOGL is not being used, I have chrome embedded in my test application and I can browse the Internet with it.
    – clapas
    Commented Dec 1, 2015 at 13:40

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.