Note: Advice in this article will only work for JxBrowser 6. See the corresponding article for JxBrowser 7 here.(注意:本文中的建议仅适用于JxBrowser6,JxBrowser7相应文章请点击这里。)

By default, JxBrowser stores user data in a folder with the path that usually looks like "%LocalAppData%\JxBrowser\browsercore-<version>\data” on Windows. On Linux and macOS user’s temp directory is used.(默认情况下,JxBrowser将用户数据存储在一个文件夹中,该文件夹的路径通常在Windows上类似于“%LocalAppData%\ JxBrowser \ browsercore- \ data”。在Linux和macOS上,使用用户的temp目录。)

To change the default behavior and customize the path to the user data directory use the following approach:(若要更改默认行为并自定义用户数据目录的路径,请使用以下方法:)

BrowserContext context = new BrowserContext(
        new BrowserContextParams("Users/Me/JxBrowser/Data"));
Browser browser = new Browser(context);

Important: In case of using a custom user data directory, it is completely possible to upgrade JxBrowser from an older version to a newer one, however, in case of a downgrade, the user data folder may appear incompatible. Such functionality is not supported, so you should avoid such situations when you downgrade JxBrowser and tell it to use the user data directory created by a newer version.(要点:如果使用自定义用户数据目录,则完全有可能将JxBrowser从旧版本升级到新版本,但是,如果降级,则用户数据文件夹可能看起来不兼容。不支持这种功能,因此当降级JxBrowser并告诉它使用由较新版本创建的用户数据目录时,应避免这种情况。)