- Spell Checker
This is an overview of the JxBrowser architecture.
The architecture of the JxBrowser library consists of the multiple processes such as Java application process and different Chromium processes:
The following sections provide details for each of the processes, the main components of the library, and describe how it all works.
This is a standard Java process where your Java application runs. Here you work with the JxBrowser API to initialize
Engine, create the
Browser instances, load the required web pages, embed
BrowserView to display content of the loaded web pages, etc.
Chromium uses Multi-Process Architecture and runs multiple processes. Each process has its own type and purpose. Below you can find description of the basic process types.
Chromium decides how many processes should be launched. It might run additional processes for its internal functionality, plugins, extensions, utilities, etc.
This process is started by JxBrowser when you create an
Engine instance. It is the main process that manages the life-cycle of other Chromium processes. If you terminate this process, all other Chromium processes produced by this one will be terminated as well.
Engine instance a separate Chromium Main process is launched.
In this process the
Browser to a web page with a different domain.
By default, each Renderer process runs in Sandbox, so it cannot directly use your disk, network, or display.
In this process the content of the web pages loaded in different Chromium Renderer processes is rendered by Chromium using the GPU.
Communication between different processes is done via Inter-Process Communication (IPC). IPC transfers data between two processes on a local machine.
To transfer data between Java and Chromium processes JxBrowser uses its own IPC implementation based on sockets and shared memory. Communication between Chromium processes is done via Chromium IPC implementation.
Manages life cycle of the Chromium Main process and provides access to the core Chromium functionality such as zoom, proxy, cache, cookies, plugins, downloads, etc.
This is a web browser control which is responsible for loading web pages or local HTML files, finding text on the loaded web page, modifying zoom, working with audio, getting notifications about loading progress, dispatching keyboard and mouse events, and more.
Each web page loaded in the
Browser has a main
Frame itself may have child frames. You can use
Frame and all child frames are closed automatically.
How it Works
When you create an
Engine instance, the library performs the following actions:
- Start the Chromium Main and GPU processes.
- Initialize Chromium engine in the Chromium Main process.
- Setup IPC connection between Java and the Chromium Main process.
If you create two
Engine instances, separate Chromium Main and GPU processes will be started for each instance. For example:
When you create a
Browser instance, the library automatically loads an
If you navigate the
Browser instance to a web page, the page will be loaded in this Chromium Renderer process. If you then load a web page with a different domain, it will be loaded in a new Chromium Renderer process which will be started automatically. And the Chromium Renderer process created for the previous web page will be closed.
If a web page has an
IFRAME with a web page from another domain, Chromium will run a separate Renderer process for this remote frame.
When you close the
Browser instance, the corresponding Chromium Renderer process is terminated automatically. It means that all the
Frame instances running in the terminated process will be automatically closed as well:
When you close the
Engine, the library performs the following actions:
- Close IPC connection between Java and the Chromium Main processes.
- Dispose Chromium engine in the Chromium Main process.
- Terminate the Chromium Main and GPU processes.