chromiumembedded / java-cef

Java Chromium Embedded Framework (JCEF). A simple framework for embedding Chromium-based browsers in other applications using the Java programming language.
https://bitbucket.org/chromiumembedded/java-cef
Other
605 stars 135 forks source link

Facing issue while building JCEF in Windows 10 #430

Closed magreenblatt closed 1 year ago

magreenblatt commented 1 year ago

Original report by Priya U K (Bitbucket: Priya U K).


I am using Windows 10 64bit OS and I have also installed below tools in my machine.

I have followed the below steps to build.

1.) Download JCEF source code using Git to below path

cd /path/to/java-cef
mkdir jcef_build && cd jcef_build
cmake -G "Visual Studio 16" -A x64 ..

2.) On Windows build the JCEF Java classes using the compile.[bat|sh] tool.

cd /path/to/java-cef/tools

compile.bat win64

3.) On Windows test that the resulting build works using the run.[bat|sh] tool.

cd /path/to/java-cef/tools

run.bat win64 Release detailed

Got ERROR : Exception in thread "main" java.lang.UnsatisfiedLinkError: no jcef in java.library.path: .\jcef_build\native\Release

4.) After building the Release configurations you can use the make_distrib.[bat|sh] script to create a binary distribution.

cd /path/to/java-cef/src/tools

make_distrib.bat win64

The files I got after build is in the below screenshot

After that I followed below steps.

Create your Java project in Eclipse and set it up:
-> Right-Click on you project: Properties
-> Java Build Path -> Libraries: "Add External JARs..." -> Select your build "jcef.jar"
-> Expand the arrow before jcef.jar
-> Select entry "Native library location" and add the external folder which contains the required native binaries (jcef.dll, jogl*.., locales, etc.)
-> Optional: Select entry Javadoc location" and point it to JCEFs javadoc directory
-> Optional: Select entry Source attachment" and point it to JCEFs Java source directory
-> Create your test application as explained in MainFrame.java (package tests.simple or tests.detailed)

But I got error while running the MainFrame.java

Please help

magreenblatt commented 1 year ago

Original comment by FriwiDev (Bitbucket: Fritz Windisch).


It appears you have not even built using visual studio. You generated the build files, but then never actually executed the build. This is also why there is no libjcef.dll in your natives, which is why java tells you that it is not there.

Are you performing modifications on jcef? If not, I would suggest to use jcefmaven, as this will run out of the box without you needing to build everything by hand for all platforms first.

magreenblatt commented 1 year ago