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-7.41.3.jar
  • jxbrowser-win32-7.41.3.jar
  • jxbrowser-win64-7.41.3.jar
  • jxbrowser-mac-7.41.3.jar
  • jxbrowser-mac-arm-7.41.3.jar
  • jxbrowser-linux64-7.41.3.jar
  • jxbrowser-linux64-arm-7.41.3.jar

For example:

java -classpath jxbrowser-7.41.3.jar;jxbrowser-win32-7.41.3.jar;\
jxbrowser-win64-7.41.3.jar;jxbrowser-mac-7.41.3.jar;\
jxbrowser-mac-arm-7.41.3.jar;jxbrowser-linux64-7.41.3.jar; \
jxbrowser-linux64-arm-7.41.3.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-7.41.3.jar;jxbrowser-win32-7.41.3.jar <app-class>

Windows 64-bit

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

macOS 64-bit

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

macOS 64-bit ARM

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

Linux 64-bit

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

Linux 64-bit ARM

java -classpath jxbrowser-7.41.3.jar;jxbrowser-linux64-arm-7.41.3.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:

Swing

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

JavaFX

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

SWT

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