List icon Contents

Configuring Java classpath

This guide describes how to add JxBrowser to a Java application classpath.

To add JxBrowser to your application classpath, download JxBrowser as a ZIP archive, extract it, and add the required JxBrowser JAR files from the lib directory to your application classpath.

Dependencies

Cross-platform

To add JxBrowser library that works on Windows, macOS, and Linux (Intel and ARM), please add the following JAR files to your application classpath:

  • jxbrowser-8.2.0.jar
  • jxbrowser-win32-8.2.0.jar
  • jxbrowser-win64-8.2.0.jar
  • jxbrowser-win64-arm-8.2.0.jar
  • jxbrowser-mac-8.2.0.jar
  • jxbrowser-mac-arm-8.2.0.jar
  • jxbrowser-linux64-8.2.0.jar
  • jxbrowser-linux64-arm-8.2.0.jar

For example:

java -classpath jxbrowser-8.2.0.jar;jxbrowser-win32-8.2.0.jar;\
jxbrowser-win64-8.2.0.jar;jxbrowser-win64-arm-8.2.0.jar;\
jxbrowser-mac-8.2.0.jar;jxbrowser-mac-arm-8.2.0.jar;\
jxbrowser-linux64-8.2.0.jar;jxbrowser-linux64-arm-8.2.0.jar \
<app-class>

Platform-specific

If you need JxBrowser JAR to work only on a specific platform, you can include only the corresponding JAR files to the program classpath as described below.

If your Java application runs only on Windows and macOS platforms and you do not support Linux platform, then you can include only Windows and macOS dependencies.

Windows 32-bit

java -classpath jxbrowser-8.2.0.jar;jxbrowser-win32-8.2.0.jar <app-class>

Windows 64-bit

java -classpath jxbrowser-8.2.0.jar;jxbrowser-win64-8.2.0.jar <app-class>

Windows 64-bit ARM

java -classpath jxbrowser-8.2.0.jar;jxbrowser-win64-arm-8.2.0.jar <app-class>

macOS 64-bit

java -classpath jxbrowser-8.2.0.jar;jxbrowser-mac-8.2.0.jar <app-class>

macOS 64-bit ARM

java -classpath jxbrowser-8.2.0.jar;jxbrowser-mac-arm-8.2.0.jar <app-class>

Linux 64-bit

java -classpath jxbrowser-8.2.0.jar;jxbrowser-linux64-8.2.0.jar <app-class>

Linux 64-bit ARM

java -classpath jxbrowser-8.2.0.jar;jxbrowser-linux64-arm-8.2.0.jar <app-class>

GUI toolkit

If you develop a Java GUI application where you would like to display web content, then you need to add one more JAR file to your application classpath depending on the GUI toolkit you use:

Compose Desktop

java -classpath jxbrowser-8.2.0.jar;jxbrowser-kotlin-8.2.0.jar;\
jxbrowser-compose-8.2.0.jar <app-class>

Swing

java -classpath jxbrowser-8.2.0.jar;jxbrowser-swing-8.2.0.jar <app-class>

JavaFX

java -classpath jxbrowser-8.2.0.jar;jxbrowser-javafx-8.2.0.jar <app-class>

SWT

java -classpath jxbrowser-8.2.0.jar;jxbrowser-swt-8.2.0.jar <app-class>