JxBrowser implements Chromium multi-process architecture. Chromium engine runs DOM and JavaScript of the loaded web page in separate render process. If you load a web page with different domain, Chromium can terminate render process of the previously loaded web page and load a new web page in new render process.(JxBrowser实现Chromium多进程体系结构。 Chromium引擎在单独的呈现过程中运行所加载网页的DOM和JavaScript。如果您加载具有不同域的网页,则Chromium可以终止先前加载的网页的渲染过程,并在新的渲染过程中加载新的网页。)

To get information about render process where the currently loaded web page is running, use the Browser.getRenderProcessInfo() method. This method collects information about currently running render process and returns it as RenderProcessInfo type.(若要获取有关当前正在加载的网页正在运行的渲染过程的信息,请使用Browser.getRenderProcessInfo()方法。此方法收集有关当前正在运行的渲染过程的信息,并将其作为RenderProcessInfo类型返回。)

The following example demonstrates how to use this functionality:(下面的示例演示如何使用此功能:)

import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.Callback;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;

import javax.swing.*;
import java.awt.*;

 * Demonstrates how to get PID of Chromium render process where DOM and
 * JavaScript of the currently loaded web page are running.
public class BrowserPIDSample {
    public static void main(String[] args) {
        final Browser browser = new Browser();
        BrowserView view = new BrowserView(browser);

        JFrame frame = new JFrame();
        frame.add(view, BorderLayout.CENTER);
        frame.setSize(700, 500);

        // Wait until https://google.com is loaded completely
        Browser.invokeAndWaitFinishLoadingMainFrame(browser, new Callback<Browser>() {
            public void invoke(Browser value) {

        // Get PID of Chromium render process associated with
        // the current Browser instance
        int pid = browser.getRenderProcessInfo().getPID();