This Wiki page lists notes for JCEF releases.
The JCEF project is an extension of the Chromium Embedded Framework project hosted at https://bitbucket.org/chromiumembedded/cef/. JCEF maintains a development branch that tracks the most recent CEF release branch. JCEF source code (both native code and Java code) can be built manually as described below.
Ongoing development of JCEF occurs on the master branch. This location tracks the current CEF3 release branch.
Building from Source
Building JCEF from source code is currently supported on Windows, Linux and Mac OS X for 64-bit Oracle Java targets. 32-bit builds are also possible on Windows and Linux but they are untested.
To build JCEF from source code you should begin by installing the build prerequisites for your operating system and development environment. For all platforms this includes:
For Linux platforms:
- Currently supported distributions include Debian Wheezy, Ubuntu Precise, and related. Newer versions will likely also work but may not have been tested. Required packages include: build-essential, libgtk2.0-dev.
For Mac OS X platforms:
- Apache Ant is required to build the Java app bundle.
- Java version newer than 8u121 is required.
For Windows platforms:
- JCEF developers are currently using Visual Studio 2015. For this reason building JCEF with other compiler versions may result in compile or runtime errors.
Download JCEF source code using Git.
# The JCEF source code will exist at `/path/to/java-cef/src` cd /path/to/java-cef git clone https://bitbucket.org/chromiumembedded/java-cef.git src
1. Run CMake to generate platform-specific project files and then build the resulting native targets. See CMake output for any additional steps that may be necessary. For example, to generate a Release build of the
# Enter the JCEF source code directory. cd /path/to/java-cef/src # Create and enter the `jcef_build` directory. # The `jcef_build` directory name is required by other JCEF tooling # and should not be changed. mkdir jcef_build && cd jcef_build # Linux: Generate 64-bit Unix Makefiles. cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. # Build using Make. make -j4 # Mac OS X: Generate 64-bit Xcode project files. cmake -G "Xcode" -DPROJECT_ARCH="x86_64" .. # Open jcef.xcodeproj in Xcode # - Select Scheme > Edit Scheme and change the "Build Configuration" to "Release" # - Select Product > Build. # Windows: Generate 64-bit VS2015 project files. cmake -G "Visual Studio 14 Win64" .. # Open jcef.sln in Visual Studio # - Select Build > Configuration Manager and change the "Active solution configuration" to "Release" # - Select Build > Build Solution.
2. On Windows and Linux build the JCEF Java classes using the compile.[bat|sh] tool.
cd /path/to/java-cef/src/tools compile.bat win64
On Mac OS X the JCEF Java classes are already built by the CMake project.
3. On Windows and Linux test that the resulting build works using the run.[bat|sh] tool. You can either run the simple example (see java/simple/MainFrame.java) or the detailed one (see java/detailed/MainFrame.java) by appending "detailed" or "simple" to the run.[bat|sh] tool. This example assumes that the "Release" configuration was built in step 1 and that you want to use the detailed example.
cd /path/to/java-cef/src/tools run.bat win64 Release detailed
On Mac OS X run jcef_app for the detailed example. Either use the command-line or double-click on jcef_app in Finder.
cd /path/to/java-cef/src/jcef_build/native/Release open jcef_app.app
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
If the process succeeds a binary distribution package will be created in the /path/to/java-cef/src/binary_distrib directory. See the README.txt file in that directory for usage instructions.