Search code examples
jxbrowser

Distributing JxBrowser and demo


I have downloaded the JxBrowser-6.23.1 demo and note that the demonstration browser, jxbrowserdemo.jar, within the \demo\ directory still works even after removing all the platform-specific libraries from the \lib\ directory and just leaving the 1,116KB jxbrowser-6.23.1.jar.

I assume the platform-specific files within the \lib\ folder are the CEF binaries, so I'm wondering how JxBrowser has managed to distribute CEF in two files that are just over 1 megabyte in size? (1,116KB - jxbrowser-6.23.1.jar (in \lib\) and 104KB - jxbrowserdemo.jar (in \Demo\))

Obviously I must be missing something here, but how does the demonstration browser work without a reference to the platform-specific CEF libraries?

(I am on a Windows 10 64-bit machine)


Edit

Creating a test project in IntelliJ also yields the same results, removing the specific cross-platform libraries has no impact on the browser working and all I need are two small libraries...?


Solution

  • Seems like Chromium binary files have been already unpacked to some folder, for example, ~\AppData\Local\JxBrowser\browsercore-69.0.3497.12.6.23.1\

    You should be able to see that folder listed in the JxBrowser log messages INFO: Chromium binaries dir: ... (to enable logging, please pass the JVM parameter -Djxbrowser.logging.level=ALL)

    JxBrowser checks this location first, and only if files are not found there, tries to extract them from the platform-specific JAR files.

    Also, JxBrowser does not use CEF binaries. The jxbrowser-win32.jar, jxbrowser-win64.jar, jxbrowser-mac.jar, jxbrowser-linux64.jar libraries are part of JxBrowser library. They contain Chromium binaries for the corresponding platform.