Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ plugins {
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
}

val jxBrowserVersion by extra { "8.15.0" } // The version of JxBrowser used in the examples.
val jxBrowserVersion by extra { "8.16.0" } // The version of JxBrowser used in the examples.
val guavaVersion by extra { "29.0-jre" } // Some of the examples use Guava.

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.text.MessageFormat;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;

/**
* This example demonstrates how to ignore SSL certificate errors
* and continue loading a website with an invalid SSL certificate.
* This example demonstrates how to ignore SSL certificate errors and continue
* loading a website with an invalid SSL certificate.
*/
public final class SslCertificateError {

public static void main(String[] args) {
var engine = Engine.newInstance(
EngineOptions.newBuilder(RenderingMode.HARDWARE_ACCELERATED).build());
EngineOptions.newBuilder(RenderingMode.HARDWARE_ACCELERATED)
.build());
var browser = engine.newBrowser();

SwingUtilities.invokeLater(() -> {
Expand All @@ -62,11 +64,10 @@ public void windowClosing(WindowEvent e) {

browser.set(CertificateErrorCallback.class, (params, tell) -> {
System.out.println(
"Request URL: " + params.url() + "\n"
+ "Reason of the certificate error: "
+ params.error().getValueDescriptor() + "(" + params.error().getNumber()
+ ")" + "\n"
+ "Invalid SSL certificate.: " + params.certificate() + "\n");
MessageFormat.format(
"Request URL: {0}\nReason of the certificate error: {1}\nInvalid SSL certificate.: {2}\n",
params.url(), params.error(),
params.certificate()));
tell.allow();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fun main() {
private fun CertificateErrorCallback.Params.print() = println(
"""
Request URL: ${url()}
Reason of the certificate error: ${error().valueDescriptor}(${error().number})
Reason of the certificate error: ${error()})
Invalid SSL certificate.: ${certificate()}
""".trimIndent()
)
2 changes: 1 addition & 1 deletion tutorials/eclipse-rcp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<maven.compiler.target>17</maven.compiler.target>
<tycho.version>4.0.13</tycho.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jxbrowser.version>8.15.0</jxbrowser.version>
<jxbrowser.version>8.16.0</jxbrowser.version>
<eclipse.release>2025-09</eclipse.release>
</properties>

Expand Down