Posted on March 29, 2024

JxBrowser 8.0.0 EAP

This page contains a complete release history for the JxBrowser 8.0.0 EAP builds in reverse chronological order.

To add the latest 8.0.0 EAP build dependencies to your project, add the following to your project configuration:

plugins {
    id("com.teamdev.jxbrowser") version "1.0.2"
}

jxbrowser {
    // The latest JxBrowser EAP version.
    version = "8.0.0-eap.2"

    // Adds a repository with JxBrowser EAP builds to the project.
    includePreviewBuilds()
}

dependencies {
    // Adds a dependency for integration with the Compose UI toolkit.
    implementation(jxbrowser.compose)
    // Adds a dependency for integration with the SWT UI toolkit.
    implementation(jxbrowser.swt)
    // Adds a dependency for integration with the Swing UI toolkit.
    implementation(jxbrowser.swing)
    // Adds a dependency for integration with the JavaFX UI toolkit.
    implementation(jxbrowser.javafx)

    // Detects the current platform and adds the corresponding Chromium binaries.
    implementation(jxbrowser.currentPlatform)
}
<repositories>
    <!-- Adds a repository with JxBrowser preview builds to the project. -->
    <repository>
        <id>teamdev-preview</id>
        <url>https://europe-maven.pkg.dev/jxbrowser/eaps</url>
    </repository>
</repositories>

<dependencies>
    <!-- Adds dependencies to the artifacts with Chromium binaries. -->
    <dependency>
        <groupId>com.teamdev.jxbrowser</groupId>
        <artifactId>jxbrowser-cross-platform</artifactId>
        <version>8.0.0-eap.2</version>
        <type>pom</type>
    </dependency>

    <!-- Adds a dependency for integration with the Swing UI toolkit. -->
    <dependency>
        <groupId>com.teamdev.jxbrowser</groupId>
        <artifactId>jxbrowser-swing</artifactId>
        <version>8.0.0-eap.2</version>
        <!-- 
           Other available options are: 
             - jxbrowser-compose
             - jxbrowser-javafx
             - jxbrowser-swt
        -->
    </dependency>
</dependencies>

To learn more about the enhancements planned for this major release, please visit JxBrowser Roadmap.

v8.0.0-eap.2

Kotlin DSL

Kotlin API for assembling Engine instance has been extended to allow configuration of all options available for Java EngineOptions.Builder. The following code demonstrates how to create an Engine instance with the specified options using the Kotlin DSL:

val engine = Engine(RenderingMode.HARDWARE_ACCELERATED) {
    options {
        passwordStore = PasswordStore.BASIC
        proprietaryFeatures = setOf(ProprietaryFeature.H_264)
        switches = listOf("--chromium-switch1", "--chromium-switch2")
    }
}

Kotlin API for BrowserSettings now provides variable properties for declarative configuration. It allows you to configure browser settings in a more concise and readable way. The following code demonstrates how to configure browser settings using the Kotlin DSL:

browser.settings.apply {
    javascriptEnabled = false
    defaultFontSize = FontSizeInPixels.of(12)
    webRtcIpHandlingPolicy = DISABLE_NON_PROXIED_UDP
}

Compose Desktop

We improved the integration with the Compose Desktop UI toolkit. JxBrowser now supports IME (Input Method Editor) and displays popup windows by default.

JxBrowser Compose Desktop IME

Chromium 123.0.6312.124

We upgraded Chromium to a newer version, which introduces multiple security fixes that prevent a remote attacker who had compromised the GPU process from potentially perform a sandbox escape via specific UI gestures, potentially exploit heap corruption via a crafted HTML page, including:

For the complete list of Chromium fixes and improvements in 123.0.6312.124 please visit the product blog posts for the following versions:

v8.0.0-eap.1

This is the first EAP build of the next major version of JxBrowser. In this build, we introduce the following new features:

Java 17

Java 17 is the minimum required JVM version for JxBrowser 8.0.0.

Kotlin DSL

Now, you can write more concise and readable Kotlin code when working with JxBrowser API thanks to the Kotlin DSL.

To add the Kotlin DSL to your project, add the following to your project configuration:

dependencies {
    // Adds a dependency to the Kotlin DSL for working with JxBrowser API.
    implementation(jxbrowser.kotlin)
}
<!-- Adds a dependency to the Kotlin DSL for working with JxBrowser API. -->
<dependency>
    <groupId>com.teamdev.jxbrowser</groupId>
    <artifactId>jxbrowser-kotlin</artifactId>
    <version>[8.0.0-eap,]</version>
</dependency>

Here is an example of how you can use the Kotlin DSL to create and configure an Engine instance:

val engine = Engine(RenderingMode.HARDWARE_ACCELERATED) {
    options {
        license = JxBrowserLicense("your_license_key")
        language = Language.GERMAN
        remoteDebuggingPort = 9222
        schemes {
            add(Scheme.JAR, InterceptJarRequestCallback())
        }
    }
}
val browser = engine.newBrowser()

Compose Desktop

We added support of one more Java UI toolkit — Compose Desktop. Now, you can embed JxBrowser BrowserView into Compose Desktop applications and build modern cross-platform desktop applications with a modern UI toolkit.

To add the JxBrowser Compose Desktop dependency to your project, add the following to your project configuration:

dependencies {
    // Adds a dependency for integration with the Compose UI toolkit.
    implementation(jxbrowser.compose)
}
<!-- Adds a dependency for integration with the Compose UI toolkit. -->
<dependency>
    <groupId>com.teamdev.jxbrowser</groupId>
    <artifactId>jxbrowser-compose</artifactId>
    <version>[8.0.0-eap,]</version>
</dependency>

Here is an example of how you can embed JxBrowser @Composable BrowserView component into a Compose Desktop application:

fun main() = singleWindowApplication {
    val engine = remember { createEngine() }
    val browser = remember { engine.newBrowser() }
    BrowserView(browser)
    DisposableEffect(Unit) {
        browser.navigation.loadUrl("google.com")
        onDispose {
            engine.close()
        }
    }
}

private fun createEngine() = Engine(RenderingMode.HARDWARE_ACCELERATED) {
    options {
        license = JxBrowserLicense("your_license_key")
    }
}
Go Top