I have a problem with sample maven project.

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

I have a problem with sample maven project.

Postby 49gvs780w » Sat Jul 01, 2017 12:57 pm

Hi!

CEF project description gives me much hope since I find HTML 5 + JS nice and easy alternative to Java's naitive GUI stuff so I want to get started with it in my idea.

I found https://github.com/viglucci/app-jcef-example.

When I right-click SimpleFrameExample and select Run SimpleFrameExample.main() I get error
Code: Select all
/usr/lib/jvm/java-8-oracle/bin/java -javaagent:/home/rain/idea-IU-171.4694.23/lib/idea_rt.jar=38245:/home/rain/idea-IU-171.4694.23/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/rain/app-jcef-example-master/target/classes:/home/rain/app-jcef-example-master/src/main/resources/jogl/jogamp/jar/gluegen-rt.jar:/home/rain/app-jcef-example-master/src/main/resources/jogl/jogamp/jar/jogl-all.jar example.simple.SimpleFrameExample
Exception in thread "main" java.lang.UnsatisfiedLinkError: no cef in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at org.cef.CefApp.<init>(CefApp.java:154)
   at org.cef.CefApp.getInstance(CefApp.java:247)
   at org.cef.CefApp.getInstance(CefApp.java:234)
   at example.simple.SimpleFrameExample.<init>(SimpleFrameExample.java:74)
   at example.simple.SimpleFrameExample.main(SimpleFrameExample.java:149)

Process finished with exit code 1


Could you tell me how I could fix that error?
49gvs780w
Newbie
 
Posts: 4
Joined: Sat Jul 01, 2017 12:38 pm

Re: I have a problem with sample maven project.

Postby waicool20 » Sun Jul 02, 2017 1:45 pm

Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: no cef in java.library.path


You need to load the corresponding dynamic library for cef when launching your app using
Code: Select all
-Djava.library.path=<path>
waicool20
Newbie
 
Posts: 7
Joined: Sat Apr 22, 2017 3:40 am

Re: I have a problem with sample maven project.

Postby 49gvs780w » Mon Jul 03, 2017 4:48 am

That I was thinking but I did not know what exactly to load there. There are tons of stuff, including some pre-compiled binaries that I can download. Do I have to link something from there or do I have to compile something myself first?
49gvs780w
Newbie
 
Posts: 4
Joined: Sat Jul 01, 2017 12:38 pm

Re: I have a problem with sample maven project.

Postby waicool20 » Thu Jul 06, 2017 1:59 am

49gvs780w wrote:That I was thinking but I did not know what exactly to load there. There are tons of stuff, including some pre-compiled binaries that I can download. Do I have to link something from there or do I have to compile something myself first?


Take a look at run.sh/run.bat that comes with cef when you compile it, just pass in the correct paths and cef should know what to do
waicool20
Newbie
 
Posts: 7
Joined: Sat Apr 22, 2017 3:40 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 23 guests