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?
POM
to use 2.3.2 but it won't fix my problem.